@iblai/iblai-api 4.118.3-core → 4.118.4-core

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.
@@ -82,17 +82,17 @@ export class CredentialsService {
82
82
  */
83
83
  public static credentialsOrgsUsersRetrieve({
84
84
  platformKey,
85
- username,
85
+ userId,
86
86
  }: {
87
87
  platformKey: string,
88
- username: string,
88
+ userId: number,
89
89
  }): CancelablePromise<Credential> {
90
90
  return __request(OpenAPI, {
91
91
  method: 'GET',
92
- url: '/api/credentials/orgs/{platform_key}/users/{username}/',
92
+ url: '/api/credentials/orgs/{platform_key}/users/{user_id}/',
93
93
  path: {
94
94
  'platform_key': platformKey,
95
- 'username': username,
95
+ 'user_id': userId,
96
96
  },
97
97
  });
98
98
  }
@@ -178,19 +178,19 @@ export class CredentialsService {
178
178
  */
179
179
  public static credentialsOrgsUsersCreate({
180
180
  platformKey,
181
- username,
181
+ userId,
182
182
  requestBody,
183
183
  }: {
184
184
  platformKey: string,
185
- username: string,
185
+ userId: number,
186
186
  requestBody: Credential,
187
187
  }): CancelablePromise<Credential> {
188
188
  return __request(OpenAPI, {
189
189
  method: 'POST',
190
- url: '/api/credentials/orgs/{platform_key}/users/{username}/',
190
+ url: '/api/credentials/orgs/{platform_key}/users/{user_id}/',
191
191
  path: {
192
192
  'platform_key': platformKey,
193
- 'username': username,
193
+ 'user_id': userId,
194
194
  },
195
195
  body: requestBody,
196
196
  mediaType: 'application/json',
@@ -239,166 +239,91 @@ export class CredentialsService {
239
239
  * "result": {credential object}
240
240
  * }
241
241
  *
242
- * DELETE: No content (204)
243
- *
244
- * Error Responses:
245
- * 400 Bad Request: If the request data is invalid
246
- * 401 Unauthorized: If the user is not authenticated
247
- * 403 Forbidden: If the user does not have permission to access this resource
248
- * 404 Not Found: If the credential doesn't exist
249
- * 500 Internal Server Error: If an unexpected error occurs
250
- *
251
- * Access Control:
252
- * - Requires CredentialAssignmentPermission
253
- * - Users can only manage credentials they have permission to access
254
- * @returns Credential
255
- * @throws ApiError
256
- */
257
- public static credentialsOrgsUsersRetrieve2({
258
- entityId,
259
- platformKey,
260
- username,
261
- }: {
262
- entityId: string,
263
- platformKey: string,
264
- username: string,
265
- }): CancelablePromise<Credential> {
266
- return __request(OpenAPI, {
267
- method: 'GET',
268
- url: '/api/credentials/orgs/{platform_key}/users/{username}/{entity_id}',
269
- path: {
270
- 'entity_id': entityId,
271
- 'platform_key': platformKey,
272
- 'username': username,
273
- },
274
- });
275
- }
276
- /**
277
- * API View for managing individual credentials.
278
- *
279
- * This endpoint allows retrieving, updating, and deleting specific credentials
280
- * identified by their entity_id.
281
- *
282
- * Path Parameters:
283
- * org (str): The organization/tenant identifier
284
- * user_id (str): The user ID making the request
285
- * entity_id (str): The credential entity ID
286
- *
287
- * Methods:
288
- * GET: Retrieve a specific credential
289
- * PUT: Update a specific credential
290
- * DELETE: Delete a specific credential
291
- *
292
- * PUT Request Body:
293
- * A JSON object containing credential details to update:
294
- * - name (str, optional): Credential name
295
- * - description (str, optional): Credential description
296
- * - credential_type (str, optional): Type of credential
297
- * - html_template (str, optional): HTML template for credential rendering
298
- * - css_template (str, optional): CSS template for credential styling
299
- * - icon_image (str, optional): URL to credential icon
300
- * - background_image (str, optional): URL to credential background
301
- * - thumbnail_image (str, optional): URL to credential thumbnail
302
- * - criteria_url (str, optional): URL to credential criteria
303
- * - criteria_text (str, optional): Text description of credential criteria
304
- * - issuing_signal (str, optional): Signal that triggers credential issuance
305
- *
306
- * Returns:
307
- * GET: A JSON response containing:
242
+ * DELETE: A JSON response indicating success:
308
243
  * {
309
- * "status": {"success": true, "description": "Ok"},
310
- * "result": {credential object}
244
+ * "status": {"success": true, "description": "Deleted"}
311
245
  * }
312
246
  *
313
- * PUT: A JSON response containing:
247
+ * Error Responses:
248
+ * 400 Bad Request: If the request data is invalid
249
+ * 401 Unauthorized: If the user is not authenticated
250
+ * 403 Forbidden: If the user does not have permission to access this resource
251
+ * 404 Not Found: If the credential doesn't exist
252
+ * 500 Internal Server Error: If an unexpected error occurs
253
+ *
254
+ * Access Control:
255
+ * - Requires CredentialAssignmentPermission
256
+ * - Users can only manage credentials they have permission to access
257
+ * @returns Credential
258
+ * @throws ApiError
259
+ */
260
+ public static credentialsOrgsUsersRetrieve2({
261
+ entityId,
262
+ platformKey,
263
+ userId,
264
+ }: {
265
+ entityId: string,
266
+ platformKey: string,
267
+ userId: number,
268
+ }): CancelablePromise<Credential> {
269
+ return __request(OpenAPI, {
270
+ method: 'GET',
271
+ url: '/api/credentials/orgs/{platform_key}/users/{user_id}/{entity_id}',
272
+ path: {
273
+ 'entity_id': entityId,
274
+ 'platform_key': platformKey,
275
+ 'user_id': userId,
276
+ },
277
+ });
278
+ }
279
+ /**
280
+ * API View for managing individual credentials.
281
+ *
282
+ * This endpoint allows retrieving, updating, and deleting specific credentials
283
+ * identified by their entity_id.
284
+ *
285
+ * Path Parameters:
286
+ * org (str): The organization/tenant identifier
287
+ * user_id (str): The user ID making the request
288
+ * entity_id (str): The credential entity ID
289
+ *
290
+ * Methods:
291
+ * GET: Retrieve a specific credential
292
+ * PUT: Update a specific credential
293
+ * DELETE: Delete a specific credential
294
+ *
295
+ * PUT Request Body:
296
+ * A JSON object containing credential details to update:
297
+ * - name (str, optional): Credential name
298
+ * - description (str, optional): Credential description
299
+ * - credential_type (str, optional): Type of credential
300
+ * - html_template (str, optional): HTML template for credential rendering
301
+ * - css_template (str, optional): CSS template for credential styling
302
+ * - icon_image (str, optional): URL to credential icon
303
+ * - background_image (str, optional): URL to credential background
304
+ * - thumbnail_image (str, optional): URL to credential thumbnail
305
+ * - criteria_url (str, optional): URL to credential criteria
306
+ * - criteria_text (str, optional): Text description of credential criteria
307
+ * - issuing_signal (str, optional): Signal that triggers credential issuance
308
+ *
309
+ * Returns:
310
+ * GET: A JSON response containing:
314
311
  * {
315
- * "status": {"success": true, "description": "Updated"},
312
+ * "status": {"success": true, "description": "Ok"},
316
313
  * "result": {credential object}
317
314
  * }
318
315
  *
319
- * DELETE: No content (204)
320
- *
321
- * Error Responses:
322
- * 400 Bad Request: If the request data is invalid
323
- * 401 Unauthorized: If the user is not authenticated
324
- * 403 Forbidden: If the user does not have permission to access this resource
325
- * 404 Not Found: If the credential doesn't exist
326
- * 500 Internal Server Error: If an unexpected error occurs
327
- *
328
- * Access Control:
329
- * - Requires CredentialAssignmentPermission
330
- * - Users can only manage credentials they have permission to access
331
- * @returns Credential
332
- * @throws ApiError
333
- */
334
- public static credentialsOrgsUsersUpdate({
335
- entityId,
336
- platformKey,
337
- username,
338
- requestBody,
339
- }: {
340
- entityId: string,
341
- platformKey: string,
342
- username: string,
343
- requestBody: Credential,
344
- }): CancelablePromise<Credential> {
345
- return __request(OpenAPI, {
346
- method: 'PUT',
347
- url: '/api/credentials/orgs/{platform_key}/users/{username}/{entity_id}',
348
- path: {
349
- 'entity_id': entityId,
350
- 'platform_key': platformKey,
351
- 'username': username,
352
- },
353
- body: requestBody,
354
- mediaType: 'application/json',
355
- });
356
- }
357
- /**
358
- * API View for managing individual credentials.
359
- *
360
- * This endpoint allows retrieving, updating, and deleting specific credentials
361
- * identified by their entity_id.
362
- *
363
- * Path Parameters:
364
- * org (str): The organization/tenant identifier
365
- * user_id (str): The user ID making the request
366
- * entity_id (str): The credential entity ID
367
- *
368
- * Methods:
369
- * GET: Retrieve a specific credential
370
- * PUT: Update a specific credential
371
- * DELETE: Delete a specific credential
372
- *
373
- * PUT Request Body:
374
- * A JSON object containing credential details to update:
375
- * - name (str, optional): Credential name
376
- * - description (str, optional): Credential description
377
- * - credential_type (str, optional): Type of credential
378
- * - html_template (str, optional): HTML template for credential rendering
379
- * - css_template (str, optional): CSS template for credential styling
380
- * - icon_image (str, optional): URL to credential icon
381
- * - background_image (str, optional): URL to credential background
382
- * - thumbnail_image (str, optional): URL to credential thumbnail
383
- * - criteria_url (str, optional): URL to credential criteria
384
- * - criteria_text (str, optional): Text description of credential criteria
385
- * - issuing_signal (str, optional): Signal that triggers credential issuance
386
- *
387
- * Returns:
388
- * GET: A JSON response containing:
316
+ * PUT: A JSON response containing:
389
317
  * {
390
- * "status": {"success": true, "description": "Ok"},
318
+ * "status": {"success": true, "description": "Updated"},
391
319
  * "result": {credential object}
392
320
  * }
393
321
  *
394
- * PUT: A JSON response containing:
322
+ * DELETE: A JSON response indicating success:
395
323
  * {
396
- * "status": {"success": true, "description": "Updated"},
397
- * "result": {credential object}
324
+ * "status": {"success": true, "description": "Deleted"}
398
325
  * }
399
326
  *
400
- * DELETE: No content (204)
401
- *
402
327
  * Error Responses:
403
328
  * 400 Bad Request: If the request data is invalid
404
329
  * 401 Unauthorized: If the user is not authenticated
@@ -409,857 +334,1003 @@ export class CredentialsService {
409
334
  * Access Control:
410
335
  * - Requires CredentialAssignmentPermission
411
336
  * - Users can only manage credentials they have permission to access
412
- * @returns void
413
- * @throws ApiError
414
- */
415
- public static credentialsOrgsUsersDestroy({
416
- entityId,
417
- platformKey,
418
- username,
419
- }: {
420
- entityId: string,
421
- platformKey: string,
422
- username: string,
423
- }): CancelablePromise<void> {
424
- return __request(OpenAPI, {
425
- method: 'DELETE',
426
- url: '/api/credentials/orgs/{platform_key}/users/{username}/{entity_id}',
427
- path: {
428
- 'entity_id': entityId,
429
- 'platform_key': platformKey,
430
- 'username': username,
431
- },
432
- });
433
- }
434
- /**
435
- * Endpoint to issue and retrieve credential assertions for a specific credential.
436
- *
437
- * This endpoint allows issuing new credential assertions and retrieving existing
438
- * assertions for a specific credential.
439
- *
440
- * Path Parameters:
441
- * org (str): The organization/tenant identifier
442
- * user_id (str): The user ID making the request
443
- * entity_id (str): The credential entity ID
444
- *
445
- * Methods:
446
- * POST: Issue a new credential assertion
447
- * GET: Retrieve assertions for a specific credential
448
- *
449
- * POST Request Body:
450
- * A JSON object containing recipient information and any additional metadata
451
- * required for issuing the credential.
452
- *
453
- * Returns:
454
- * POST: A JSON response containing the created assertion using the AssertionSerializer format
455
- * GET: A paginated list of assertions using the AssertionSerializer format
456
- *
457
- * Error Responses:
458
- * 400 Bad Request: If the request data is invalid
459
- * 401 Unauthorized: If the user is not authenticated
460
- * 403 Forbidden: If the user does not have permission to access this resource
461
- * 404 Not Found: If the credential doesn't exist
462
- * 500 Internal Server Error: If an unexpected error occurs
463
- * @returns PaginatedAssertionsResponse
464
- * @throws ApiError
465
- */
466
- public static credentialsOrgsUsersAssertionsRetrieve3({
467
- entityId,
468
- platformKey,
469
- username,
470
- }: {
471
- entityId: string,
472
- platformKey: string,
473
- username: string,
474
- }): CancelablePromise<PaginatedAssertionsResponse> {
475
- return __request(OpenAPI, {
476
- method: 'GET',
477
- url: '/api/credentials/orgs/{platform_key}/users/{username}/{entity_id}/assertions/',
478
- path: {
479
- 'entity_id': entityId,
480
- 'platform_key': platformKey,
481
- 'username': username,
482
- },
483
- });
484
- }
485
- /**
486
- * Endpoint to issue and retrieve credential assertions for a specific credential.
487
- *
488
- * This endpoint allows issuing new credential assertions and retrieving existing
489
- * assertions for a specific credential.
490
- *
491
- * Path Parameters:
492
- * org (str): The organization/tenant identifier
493
- * user_id (str): The user ID making the request
494
- * entity_id (str): The credential entity ID
495
- *
496
- * Methods:
497
- * POST: Issue a new credential assertion
498
- * GET: Retrieve assertions for a specific credential
499
- *
500
- * POST Request Body:
501
- * A JSON object containing recipient information and any additional metadata
502
- * required for issuing the credential.
503
- *
504
- * Returns:
505
- * POST: A JSON response containing the created assertion using the AssertionSerializer format
506
- * GET: A paginated list of assertions using the AssertionSerializer format
507
- *
508
- * Error Responses:
509
- * 400 Bad Request: If the request data is invalid
510
- * 401 Unauthorized: If the user is not authenticated
511
- * 403 Forbidden: If the user does not have permission to access this resource
512
- * 404 Not Found: If the credential doesn't exist
513
- * 500 Internal Server Error: If an unexpected error occurs
514
- * @returns Assertion
337
+ * @returns Credential
515
338
  * @throws ApiError
516
339
  */
517
- public static credentialsOrgsUsersAssertionsCreate({
340
+ public static credentialsOrgsUsersUpdate({
518
341
  entityId,
519
342
  platformKey,
520
- username,
343
+ userId,
521
344
  requestBody,
522
345
  }: {
523
346
  entityId: string,
524
347
  platformKey: string,
525
- username: string,
526
- requestBody: Assertion,
527
- }): CancelablePromise<Assertion> {
348
+ userId: number,
349
+ requestBody: Credential,
350
+ }): CancelablePromise<Credential> {
528
351
  return __request(OpenAPI, {
529
- method: 'POST',
530
- url: '/api/credentials/orgs/{platform_key}/users/{username}/{entity_id}/assertions/',
352
+ method: 'PUT',
353
+ url: '/api/credentials/orgs/{platform_key}/users/{user_id}/{entity_id}',
531
354
  path: {
532
355
  'entity_id': entityId,
533
356
  'platform_key': platformKey,
534
- 'username': username,
357
+ 'user_id': userId,
535
358
  },
536
359
  body: requestBody,
537
360
  mediaType: 'application/json',
538
361
  });
539
362
  }
540
363
  /**
541
- * Endpoint to issue credential assertions in bulk for a specific credential.
364
+ * API View for managing individual credentials.
542
365
  *
543
- * This endpoint allows issuing credential assertions to multiple users at once.
366
+ * This endpoint allows retrieving, updating, and deleting specific credentials
367
+ * identified by their entity_id.
544
368
  *
545
369
  * Path Parameters:
546
370
  * org (str): The organization/tenant identifier
547
371
  * user_id (str): The user ID making the request
548
372
  * entity_id (str): The credential entity ID
549
373
  *
550
- * POST Request Body:
551
- * A JSON object containing:
552
- * - users (list): List of usernames to issue the credential to
553
- * - Additional metadata required for issuing the credential
374
+ * Methods:
375
+ * GET: Retrieve a specific credential
376
+ * PUT: Update a specific credential
377
+ * DELETE: Delete a specific credential
378
+ *
379
+ * PUT Request Body:
380
+ * A JSON object containing credential details to update:
381
+ * - name (str, optional): Credential name
382
+ * - description (str, optional): Credential description
383
+ * - credential_type (str, optional): Type of credential
384
+ * - html_template (str, optional): HTML template for credential rendering
385
+ * - css_template (str, optional): CSS template for credential styling
386
+ * - icon_image (str, optional): URL to credential icon
387
+ * - background_image (str, optional): URL to credential background
388
+ * - thumbnail_image (str, optional): URL to credential thumbnail
389
+ * - criteria_url (str, optional): URL to credential criteria
390
+ * - criteria_text (str, optional): Text description of credential criteria
391
+ * - issuing_signal (str, optional): Signal that triggers credential issuance
554
392
  *
555
393
  * Returns:
556
- * A JSON response containing:
394
+ * GET: A JSON response containing:
557
395
  * {
558
- * "skipped": ["username1", "username3"], // Users that were skipped (e.g., already have the credential)
559
- * "issued": ["username2", "username4"] // Users that were successfully issued the credential
396
+ * "status": {"success": true, "description": "Ok"},
397
+ * "result": {credential object}
560
398
  * }
561
399
  *
562
- * Error Responses:
563
- * 400 Bad Request: If the request data is invalid or missing required fields
564
- * 401 Unauthorized: If the user is not authenticated
565
- * 403 Forbidden: If the user does not have permission to access this resource
566
- * 404 Not Found: If the credential doesn't exist
567
- * 500 Internal Server Error: If an unexpected error occurs
568
- * @returns BulkCreateAssertion
569
- * @throws ApiError
570
- */
571
- public static credentialsOrgsUsersAssertionsBulkCreate({
572
- entityId,
573
- platformKey,
574
- username,
575
- requestBody,
576
- }: {
577
- entityId: string,
578
- platformKey: string,
579
- username: string,
580
- requestBody: BulkCreateAssertion,
581
- }): CancelablePromise<BulkCreateAssertion> {
582
- return __request(OpenAPI, {
583
- method: 'POST',
584
- url: '/api/credentials/orgs/{platform_key}/users/{username}/{entity_id}/assertions/bulk/',
585
- path: {
586
- 'entity_id': entityId,
587
- 'platform_key': platformKey,
588
- 'username': username,
589
- },
590
- body: requestBody,
591
- mediaType: 'application/json',
592
- });
593
- }
594
- /**
595
- * Endpoint to retrieve all credential assertions for a user within an organization.
596
- *
597
- * This endpoint provides access to all credential assertions (issued credentials)
598
- * for a specific user within an organization, with support for filtering.
599
- *
600
- * Path Parameters:
601
- * org (str): The organization/tenant identifier
602
- * user_id (str): The user ID to retrieve assertions for
603
- *
604
- * Query Parameters:
605
- * course (str, optional): Filter by course ID
606
- * include_revoked (bool, optional): Include revoked assertions (default: false)
607
- * include_expired (bool, optional): Include expired assertions (default: false)
608
- * exclude_main_tenant_assertions (bool, optional): Exclude assertions from the main tenant (default: false)
609
- *
610
- * Returns:
611
- * A paginated response using the AssertionSerializer format
612
- *
613
- * Error Responses:
614
- * 401 Unauthorized: If the user is not authenticated
615
- * 403 Forbidden: If the user does not have permission to access this resource
616
- * 404 Not Found: If the user or organization doesn't exist
617
- * 500 Internal Server Error: If an unexpected error occurs
618
- * @returns PaginatedAssertionsResponse
619
- * @throws ApiError
620
- */
621
- public static credentialsOrgsUsersAssertionsRetrieve({
622
- platformKey,
623
- username,
624
- course,
625
- excludeMainTenantAssertions,
626
- includeExpired,
627
- includeRevoked,
628
- page,
629
- pageSize,
630
- }: {
631
- platformKey: string,
632
- username: string,
633
- course?: string,
634
- excludeMainTenantAssertions?: boolean,
635
- includeExpired?: boolean,
636
- includeRevoked?: boolean,
637
- page?: number,
638
- pageSize?: number,
639
- }): CancelablePromise<PaginatedAssertionsResponse> {
640
- return __request(OpenAPI, {
641
- method: 'GET',
642
- url: '/api/credentials/orgs/{platform_key}/users/{username}/assertions/',
643
- path: {
644
- 'platform_key': platformKey,
645
- 'username': username,
646
- },
647
- query: {
648
- 'course': course,
649
- 'exclude_main_tenant_assertions': excludeMainTenantAssertions,
650
- 'include_expired': includeExpired,
651
- 'include_revoked': includeRevoked,
652
- 'page': page,
653
- 'page_size': pageSize,
654
- },
655
- });
656
- }
657
- /**
658
- * Get all credentials of a given tenant
659
- * @returns OvertimeWithChangeInfo
660
- * @throws ApiError
661
- */
662
- public static credentialsOrgsUsersAssertionsOverTimeRetrieve({
663
- platformKey,
664
- username,
665
- departmentId,
666
- endDate,
667
- format = 'json',
668
- includeMainPlatform = true,
669
- startDate,
670
- }: {
671
- platformKey: string,
672
- username: string,
673
- /**
674
- * When `department_mode=1` is passed, it allows to filter data for only user content groups for the specified department
675
- */
676
- departmentId?: number,
677
- /**
678
- * end date. ISO 8601
679
- */
680
- endDate?: string,
681
- /**
682
- * Format
683
- *
684
- * * `json` - json
685
- */
686
- format?: 'json',
687
- /**
688
- * Include main platform data
689
- */
690
- includeMainPlatform?: boolean,
691
- /**
692
- * start date. ISO 8601
693
- */
694
- startDate?: string,
695
- }): CancelablePromise<OvertimeWithChangeInfo> {
696
- return __request(OpenAPI, {
697
- method: 'GET',
698
- url: '/api/credentials/orgs/{platform_key}/users/{username}/assertions-over-time/',
699
- path: {
700
- 'platform_key': platformKey,
701
- 'username': username,
702
- },
703
- query: {
704
- 'department_id': departmentId,
705
- 'end_date': endDate,
706
- 'format': format,
707
- 'include_main_platform': includeMainPlatform,
708
- 'start_date': startDate,
709
- },
710
- });
711
- }
712
- /**
713
- * Endpoint to retrieve and update a specific credential assertion.
714
- *
715
- * This endpoint allows retrieving details of a specific credential assertion
716
- * and updating its status (e.g., revoking it).
717
- *
718
- * Path Parameters:
719
- * org (str): The organization/tenant identifier
720
- * user_id (str): The user ID making the request
721
- * entity_id (str): The assertion entity ID
722
- *
723
- * Methods:
724
- * GET: Retrieve assertion details
725
- * PUT: Update assertion status (e.g., revoke)
726
- *
727
- * PUT Request Body:
728
- * A JSON object containing:
729
- * - revoked (bool): Set to true to revoke the assertion
730
- * - revocationReason (str): Reason for revocation (required when revoking)
731
- *
732
- * Returns:
733
- * GET: A JSON response containing the assertion details using the AssertionSerializer format
734
- * PUT: A JSON response containing the updated assertion using the AssertionSerializer format
735
- *
736
- * Error Responses:
737
- * 400 Bad Request: If the request data is invalid
738
- * 401 Unauthorized: If the user is not authenticated
739
- * 403 Forbidden: If the user does not have permission to access this resource
740
- * 404 Not Found: If the assertion doesn't exist
741
- * 500 Internal Server Error: If an unexpected error occurs
742
- * @returns Assertion
743
- * @throws ApiError
744
- */
745
- public static credentialsOrgsUsersAssertionsRetrieve2({
746
- entityId,
747
- platformKey,
748
- username,
749
- }: {
750
- entityId: string,
751
- platformKey: string,
752
- username: string,
753
- }): CancelablePromise<Assertion> {
754
- return __request(OpenAPI, {
755
- method: 'GET',
756
- url: '/api/credentials/orgs/{platform_key}/users/{username}/assertions/{entity_id}',
757
- path: {
758
- 'entity_id': entityId,
759
- 'platform_key': platformKey,
760
- 'username': username,
761
- },
762
- });
763
- }
764
- /**
765
- * Endpoint to retrieve and update a specific credential assertion.
766
- *
767
- * This endpoint allows retrieving details of a specific credential assertion
768
- * and updating its status (e.g., revoking it).
769
- *
770
- * Path Parameters:
771
- * org (str): The organization/tenant identifier
772
- * user_id (str): The user ID making the request
773
- * entity_id (str): The assertion entity ID
774
- *
775
- * Methods:
776
- * GET: Retrieve assertion details
777
- * PUT: Update assertion status (e.g., revoke)
778
- *
779
- * PUT Request Body:
780
- * A JSON object containing:
781
- * - revoked (bool): Set to true to revoke the assertion
782
- * - revocationReason (str): Reason for revocation (required when revoking)
783
- *
784
- * Returns:
785
- * GET: A JSON response containing the assertion details using the AssertionSerializer format
786
- * PUT: A JSON response containing the updated assertion using the AssertionSerializer format
787
- *
788
- * Error Responses:
789
- * 400 Bad Request: If the request data is invalid
790
- * 401 Unauthorized: If the user is not authenticated
791
- * 403 Forbidden: If the user does not have permission to access this resource
792
- * 404 Not Found: If the assertion doesn't exist
793
- * 500 Internal Server Error: If an unexpected error occurs
794
- * @returns Assertion
795
- * @throws ApiError
796
- */
797
- public static credentialsOrgsUsersAssertionsUpdate({
798
- entityId,
799
- platformKey,
800
- username,
801
- requestBody,
802
- }: {
803
- entityId: string,
804
- platformKey: string,
805
- username: string,
806
- requestBody: Assertion,
807
- }): CancelablePromise<Assertion> {
808
- return __request(OpenAPI, {
809
- method: 'PUT',
810
- url: '/api/credentials/orgs/{platform_key}/users/{username}/assertions/{entity_id}',
811
- path: {
812
- 'entity_id': entityId,
813
- 'platform_key': platformKey,
814
- 'username': username,
815
- },
816
- body: requestBody,
817
- mediaType: 'application/json',
818
- });
819
- }
820
- /**
821
- * Delete a credential assignment using its entity_id.
822
- * Only platform admins and department admins can delete assignments.
823
- * @returns void
824
- * @throws ApiError
825
- */
826
- public static credentialsOrgsUsersAssignmentsDestroy({
827
- assignmentId,
828
- platformKey,
829
- username,
830
- }: {
831
- assignmentId: string,
832
- platformKey: string,
833
- username: string,
834
- }): CancelablePromise<void> {
835
- return __request(OpenAPI, {
836
- method: 'DELETE',
837
- url: '/api/credentials/orgs/{platform_key}/users/{username}/assignments/{assignment_id}',
838
- path: {
839
- 'assignment_id': assignmentId,
840
- 'platform_key': platformKey,
841
- 'username': username,
842
- },
843
- });
844
- }
845
- /**
846
- * Get group assignments with department-aware filtering
847
- * @returns any No response body
848
- * @throws ApiError
849
- */
850
- public static credentialsOrgsUsersAssignmentsGroupsRetrieve({
851
- platformKey,
852
- username,
853
- }: {
854
- platformKey: string,
855
- username: string,
856
- }): CancelablePromise<any> {
857
- return __request(OpenAPI, {
858
- method: 'GET',
859
- url: '/api/credentials/orgs/{platform_key}/users/{username}/assignments/groups/',
860
- path: {
861
- 'platform_key': platformKey,
862
- 'username': username,
863
- },
864
- });
865
- }
866
- /**
867
- * Create group assignment with department access validation
868
- * @returns any No response body
869
- * @throws ApiError
870
- */
871
- public static credentialsOrgsUsersAssignmentsGroupsCreate({
872
- platformKey,
873
- username,
874
- }: {
875
- platformKey: string,
876
- username: string,
877
- }): CancelablePromise<any> {
878
- return __request(OpenAPI, {
879
- method: 'POST',
880
- url: '/api/credentials/orgs/{platform_key}/users/{username}/assignments/groups/',
881
- path: {
882
- 'platform_key': platformKey,
883
- 'username': username,
884
- },
885
- });
886
- }
887
- /**
888
- * Get assignments and their corresponding assertions based on user role:
889
- * - Regular users: get only their own assignments
890
- * - Platform admins: get assignments for all users in their platform
891
- * - Department admins: get assignments for users in their department groups
892
- * @returns any No response body
893
- * @throws ApiError
894
- */
895
- public static credentialsOrgsUsersAssignmentsUsersRetrieve({
896
- platformKey,
897
- username,
898
- }: {
899
- platformKey: string,
900
- username: string,
901
- }): CancelablePromise<any> {
902
- return __request(OpenAPI, {
903
- method: 'GET',
904
- url: '/api/credentials/orgs/{platform_key}/users/{username}/assignments/users/',
905
- path: {
906
- 'platform_key': platformKey,
907
- 'username': username,
908
- },
909
- });
910
- }
911
- /**
912
- * Create assignments with department access validation
913
- * @returns any No response body
914
- * @throws ApiError
915
- */
916
- public static credentialsOrgsUsersAssignmentsUsersCreate({
917
- platformKey,
918
- username,
919
- }: {
920
- platformKey: string,
921
- username: string,
922
- }): CancelablePromise<any> {
923
- return __request(OpenAPI, {
924
- method: 'POST',
925
- url: '/api/credentials/orgs/{platform_key}/users/{username}/assignments/users/',
926
- path: {
927
- 'platform_key': platformKey,
928
- 'username': username,
929
- },
930
- });
931
- }
932
- /**
933
- * Get all credentials of a given tenant
934
- * @returns OverTime
935
- * @throws ApiError
936
- */
937
- public static credentialsOrgsUsersCourseAssertionsOverTimeRetrieve({
938
- platformKey,
939
- username,
940
- departmentId,
941
- endDate,
942
- format = 'json',
943
- includeMainPlatform = true,
944
- startDate,
945
- }: {
946
- platformKey: string,
947
- username: string,
948
- /**
949
- * When `department_mode=1` is passed, it allows to filter data for only user content groups for the specified department
950
- */
951
- departmentId?: number,
952
- /**
953
- * end date. ISO 8601
954
- */
955
- endDate?: string,
956
- /**
957
- * Format
958
- *
959
- * * `json` - json
960
- */
961
- format?: 'json',
962
- /**
963
- * Include main platform data
964
- */
965
- includeMainPlatform?: boolean,
966
- /**
967
- * start date. ISO 8601
968
- */
969
- startDate?: string,
970
- }): CancelablePromise<OverTime> {
971
- return __request(OpenAPI, {
972
- method: 'GET',
973
- url: '/api/credentials/orgs/{platform_key}/users/{username}/course-assertions-over-time/',
974
- path: {
975
- 'platform_key': platformKey,
976
- 'username': username,
977
- },
978
- query: {
979
- 'department_id': departmentId,
980
- 'end_date': endDate,
981
- 'format': format,
982
- 'include_main_platform': includeMainPlatform,
983
- 'start_date': startDate,
984
- },
985
- });
986
- }
987
- /**
988
- * Endpoint to retrieve the credentials of a given tenant grouped by course.
989
- *
990
- * This endpoint provides access to credential data grouped by course for a specific
991
- * organization/tenant, with support for pagination and filtering.
992
- *
993
- * Path Parameters:
994
- * org (str): The organization/tenant identifier
995
- *
996
- * Query Parameters:
997
- * limit (int, optional): Number of results per page (default: 10)
998
- * offset (int, optional): Starting position for pagination
999
- * search (str, optional): Search term e.g course_id
1000
- *
1001
- * Returns:
1002
- * A paginated response using the CourseCredentialSerializer format.
1003
- *
1004
- * Error Responses:
1005
- * 401 Unauthorized: If the user is not authenticated
1006
- * 403 Forbidden: If the user does not have permission to access this data
1007
- * 404 Not Found: If the organization doesn't exist
1008
- * 500 Internal Server Error: If an unexpected error occurs
1009
- * @returns any No response body
1010
- * @throws ApiError
1011
- */
1012
- public static credentialsOrgsUsersCourseCredentialsList({
1013
- platformKey,
1014
- username,
1015
- page,
1016
- pageSize,
1017
- }: {
1018
- platformKey: string,
1019
- username: string,
1020
- /**
1021
- * A page number within the paginated result set.
1022
- */
1023
- page?: number,
1024
- /**
1025
- * Number of results to return per page.
1026
- */
1027
- pageSize?: number,
1028
- }): CancelablePromise<any> {
1029
- return __request(OpenAPI, {
1030
- method: 'GET',
1031
- url: '/api/credentials/orgs/{platform_key}/users/{username}/course-credentials/',
1032
- path: {
1033
- 'platform_key': platformKey,
1034
- 'username': username,
1035
- },
1036
- query: {
1037
- 'page': page,
1038
- 'page_size': pageSize,
1039
- },
1040
- });
1041
- }
1042
- /**
1043
- * Get all credentials of a given tenant
1044
- * @returns OverTime
1045
- * @throws ApiError
1046
- */
1047
- public static credentialsOrgsUsersCredentialsOverTimeRetrieve({
1048
- platformKey,
1049
- username,
1050
- departmentId,
1051
- endDate,
1052
- format = 'json',
1053
- includeMainPlatform = true,
1054
- startDate,
1055
- }: {
1056
- platformKey: string,
1057
- username: string,
1058
- /**
1059
- * When `department_mode=1` is passed, it allows to filter data for only user content groups for the specified department
1060
- */
1061
- departmentId?: number,
1062
- /**
1063
- * end date. ISO 8601
1064
- */
1065
- endDate?: string,
1066
- /**
1067
- * Format
1068
- *
1069
- * * `json` - json
1070
- */
1071
- format?: 'json',
1072
- /**
1073
- * Include main platform data
1074
- */
1075
- includeMainPlatform?: boolean,
1076
- /**
1077
- * start date. ISO 8601
1078
- */
1079
- startDate?: string,
1080
- }): CancelablePromise<OverTime> {
1081
- return __request(OpenAPI, {
1082
- method: 'GET',
1083
- url: '/api/credentials/orgs/{platform_key}/users/{username}/credentials-over-time/',
1084
- path: {
1085
- 'platform_key': platformKey,
1086
- 'username': username,
1087
- },
1088
- query: {
1089
- 'department_id': departmentId,
1090
- 'end_date': endDate,
1091
- 'format': format,
1092
- 'include_main_platform': includeMainPlatform,
1093
- 'start_date': startDate,
1094
- },
1095
- });
1096
- }
1097
- /**
1098
- * Retrieve external credential mappings for the platform.
1099
- *
1100
- * Query Parameters:
1101
- * credential_id (str, optional): Filter by credential entity_id
1102
- * provider_name (str, optional): Filter by provider name
1103
- * page (int, optional): Page number
1104
- * page_size (int, optional): Items per page
1105
- *
1106
- * Returns all mappings for the platform if the user is an admin.
1107
- * @returns ExternalCredentialMapping
1108
- * @throws ApiError
1109
- */
1110
- public static credentialsOrgsUsersExternalMappingRetrieve({
1111
- platformKey,
1112
- username,
1113
- }: {
1114
- platformKey: string,
1115
- username: string,
1116
- }): CancelablePromise<ExternalCredentialMapping> {
1117
- return __request(OpenAPI, {
1118
- method: 'GET',
1119
- url: '/api/credentials/orgs/{platform_key}/users/{username}/external-mapping/',
1120
- path: {
1121
- 'platform_key': platformKey,
1122
- 'username': username,
1123
- },
1124
- });
1125
- }
1126
- /**
1127
- * Create or update an external credential mapping.
1128
- *
1129
- * If a mapping doesn't exist for the credential + platform + provider combination,
1130
- * it will be created. If it exists, it will be updated.
1131
- *
1132
- * Request Body:
400
+ * PUT: A JSON response containing:
1133
401
  * {
1134
- * "credential_id": "credential-entity-id", // Required
1135
- * "provider_name": "accredible", // Required
1136
- * "external_template_id": "123456", // Optional
1137
- * "metadata": {} // Optional
402
+ * "status": {"success": true, "description": "Updated"},
403
+ * "result": {credential object}
1138
404
  * }
1139
405
  *
1140
- * Returns:
1141
- * - 201 Created: When creating a new mapping
1142
- * - 200 OK: When updating an existing mapping
1143
- * @returns ExternalCredentialMapping
1144
- * @throws ApiError
1145
- */
1146
- public static credentialsOrgsUsersExternalMappingCreate({
1147
- platformKey,
1148
- username,
1149
- requestBody,
1150
- }: {
1151
- platformKey: string,
1152
- username: string,
1153
- requestBody: ExternalCredentialMapping,
1154
- }): CancelablePromise<ExternalCredentialMapping> {
1155
- return __request(OpenAPI, {
1156
- method: 'POST',
1157
- url: '/api/credentials/orgs/{platform_key}/users/{username}/external-mapping/',
1158
- path: {
1159
- 'platform_key': platformKey,
1160
- 'username': username,
1161
- },
1162
- body: requestBody,
1163
- mediaType: 'application/json',
1164
- });
1165
- }
1166
- /**
1167
- * Delete an external credential mapping.
1168
- *
1169
- * Request Body:
406
+ * DELETE: A JSON response indicating success:
1170
407
  * {
1171
- * "credential_id": "credential-entity-id", // Required
1172
- * "provider_name": "accredible" // Required
408
+ * "status": {"success": true, "description": "Deleted"}
1173
409
  * }
1174
410
  *
1175
- * Returns:
1176
- * A JSON response confirming deletion
411
+ * Error Responses:
412
+ * 400 Bad Request: If the request data is invalid
413
+ * 401 Unauthorized: If the user is not authenticated
414
+ * 403 Forbidden: If the user does not have permission to access this resource
415
+ * 404 Not Found: If the credential doesn't exist
416
+ * 500 Internal Server Error: If an unexpected error occurs
417
+ *
418
+ * Access Control:
419
+ * - Requires CredentialAssignmentPermission
420
+ * - Users can only manage credentials they have permission to access
1177
421
  * @returns void
1178
422
  * @throws ApiError
1179
423
  */
1180
- public static credentialsOrgsUsersExternalMappingDestroy({
424
+ public static credentialsOrgsUsersDestroy({
425
+ entityId,
1181
426
  platformKey,
1182
- username,
427
+ userId,
1183
428
  }: {
429
+ entityId: string,
1184
430
  platformKey: string,
1185
- username: string,
431
+ userId: number,
1186
432
  }): CancelablePromise<void> {
1187
433
  return __request(OpenAPI, {
1188
434
  method: 'DELETE',
1189
- url: '/api/credentials/orgs/{platform_key}/users/{username}/external-mapping/',
435
+ url: '/api/credentials/orgs/{platform_key}/users/{user_id}/{entity_id}',
1190
436
  path: {
437
+ 'entity_id': entityId,
1191
438
  'platform_key': platformKey,
1192
- 'username': username,
439
+ 'user_id': userId,
1193
440
  },
1194
441
  });
1195
442
  }
1196
443
  /**
1197
- * API View for managing uploaded images for credentials.
1198
- *
1199
- * This endpoint allows uploading new images and retrieving existing images
1200
- * for use with credentials (icons, backgrounds, thumbnails, etc.).
1201
- *
1202
- * Path Parameters:
1203
- * org (str): The organization/tenant identifier
1204
- * user_id (str): The user ID making the request
444
+ * @returns PaginatedAssertionsResponse
445
+ * @throws ApiError
446
+ */
447
+ public static credentialsOrgsUsersAssertionsRetrieve3({
448
+ entityId,
449
+ platformKey,
450
+ userId,
451
+ }: {
452
+ entityId: string,
453
+ platformKey: string,
454
+ userId: number,
455
+ }): CancelablePromise<PaginatedAssertionsResponse> {
456
+ return __request(OpenAPI, {
457
+ method: 'GET',
458
+ url: '/api/credentials/orgs/{platform_key}/users/{user_id}/{entity_id}/assertions/',
459
+ path: {
460
+ 'entity_id': entityId,
461
+ 'platform_key': platformKey,
462
+ 'user_id': userId,
463
+ },
464
+ });
465
+ }
466
+ /**
467
+ * @returns Assertion
468
+ * @throws ApiError
469
+ */
470
+ public static credentialsOrgsUsersAssertionsCreate({
471
+ entityId,
472
+ platformKey,
473
+ userId,
474
+ requestBody,
475
+ }: {
476
+ entityId: string,
477
+ platformKey: string,
478
+ userId: number,
479
+ requestBody: Assertion,
480
+ }): CancelablePromise<Assertion> {
481
+ return __request(OpenAPI, {
482
+ method: 'POST',
483
+ url: '/api/credentials/orgs/{platform_key}/users/{user_id}/{entity_id}/assertions/',
484
+ path: {
485
+ 'entity_id': entityId,
486
+ 'platform_key': platformKey,
487
+ 'user_id': userId,
488
+ },
489
+ body: requestBody,
490
+ mediaType: 'application/json',
491
+ });
492
+ }
493
+ /**
494
+ * @returns BulkCreateAssertion
495
+ * @throws ApiError
496
+ */
497
+ public static credentialsOrgsUsersAssertionsBulkCreate({
498
+ entityId,
499
+ platformKey,
500
+ userId,
501
+ requestBody,
502
+ }: {
503
+ entityId: string,
504
+ platformKey: string,
505
+ userId: number,
506
+ requestBody: BulkCreateAssertion,
507
+ }): CancelablePromise<BulkCreateAssertion> {
508
+ return __request(OpenAPI, {
509
+ method: 'POST',
510
+ url: '/api/credentials/orgs/{platform_key}/users/{user_id}/{entity_id}/assertions/bulk/',
511
+ path: {
512
+ 'entity_id': entityId,
513
+ 'platform_key': platformKey,
514
+ 'user_id': userId,
515
+ },
516
+ body: requestBody,
517
+ mediaType: 'application/json',
518
+ });
519
+ }
520
+ /**
521
+ * A GET View that validates QueryParams and returns results to a serializer
522
+ * @returns PaginatedAssertionsResponse
523
+ * @throws ApiError
524
+ */
525
+ public static credentialsOrgsUsersAssertionsRetrieve({
526
+ platformKey,
527
+ userId,
528
+ course,
529
+ excludeMainTenantAssertions,
530
+ includeExpired,
531
+ includeRevoked,
532
+ page,
533
+ pageSize,
534
+ }: {
535
+ platformKey: string,
536
+ userId: number,
537
+ course?: string,
538
+ excludeMainTenantAssertions?: boolean,
539
+ includeExpired?: boolean,
540
+ includeRevoked?: boolean,
541
+ page?: number,
542
+ pageSize?: number,
543
+ }): CancelablePromise<PaginatedAssertionsResponse> {
544
+ return __request(OpenAPI, {
545
+ method: 'GET',
546
+ url: '/api/credentials/orgs/{platform_key}/users/{user_id}/assertions/',
547
+ path: {
548
+ 'platform_key': platformKey,
549
+ 'user_id': userId,
550
+ },
551
+ query: {
552
+ 'course': course,
553
+ 'exclude_main_tenant_assertions': excludeMainTenantAssertions,
554
+ 'include_expired': includeExpired,
555
+ 'include_revoked': includeRevoked,
556
+ 'page': page,
557
+ 'page_size': pageSize,
558
+ },
559
+ });
560
+ }
561
+ /**
562
+ * Get all credentials of a given tenant
563
+ * @returns OvertimeWithChangeInfo
564
+ * @throws ApiError
565
+ */
566
+ public static credentialsOrgsUsersAssertionsOverTimeRetrieve({
567
+ platformKey,
568
+ userId,
569
+ departmentId,
570
+ endDate,
571
+ format = 'json',
572
+ includeMainPlatform = true,
573
+ startDate,
574
+ }: {
575
+ platformKey: string,
576
+ userId: number,
577
+ /**
578
+ * When `department_mode=1` is passed, it allows to filter data for only user content groups for the specified department
579
+ */
580
+ departmentId?: number,
581
+ /**
582
+ * end date. ISO 8601
583
+ */
584
+ endDate?: string,
585
+ /**
586
+ * Format
587
+ *
588
+ * * `json` - json
589
+ */
590
+ format?: 'json',
591
+ /**
592
+ * Include main platform data
593
+ */
594
+ includeMainPlatform?: boolean,
595
+ /**
596
+ * start date. ISO 8601
597
+ */
598
+ startDate?: string,
599
+ }): CancelablePromise<OvertimeWithChangeInfo> {
600
+ return __request(OpenAPI, {
601
+ method: 'GET',
602
+ url: '/api/credentials/orgs/{platform_key}/users/{user_id}/assertions-over-time/',
603
+ path: {
604
+ 'platform_key': platformKey,
605
+ 'user_id': userId,
606
+ },
607
+ query: {
608
+ 'department_id': departmentId,
609
+ 'end_date': endDate,
610
+ 'format': format,
611
+ 'include_main_platform': includeMainPlatform,
612
+ 'start_date': startDate,
613
+ },
614
+ });
615
+ }
616
+ /**
617
+ * @returns Assertion
618
+ * @throws ApiError
619
+ */
620
+ public static credentialsOrgsUsersAssertionsRetrieve2({
621
+ entityId,
622
+ platformKey,
623
+ userId,
624
+ }: {
625
+ entityId: string,
626
+ platformKey: string,
627
+ userId: number,
628
+ }): CancelablePromise<Assertion> {
629
+ return __request(OpenAPI, {
630
+ method: 'GET',
631
+ url: '/api/credentials/orgs/{platform_key}/users/{user_id}/assertions/{entity_id}',
632
+ path: {
633
+ 'entity_id': entityId,
634
+ 'platform_key': platformKey,
635
+ 'user_id': userId,
636
+ },
637
+ });
638
+ }
639
+ /**
640
+ * @returns Assertion
641
+ * @throws ApiError
642
+ */
643
+ public static credentialsOrgsUsersAssertionsUpdate({
644
+ entityId,
645
+ platformKey,
646
+ userId,
647
+ requestBody,
648
+ }: {
649
+ entityId: string,
650
+ platformKey: string,
651
+ userId: number,
652
+ requestBody: Assertion,
653
+ }): CancelablePromise<Assertion> {
654
+ return __request(OpenAPI, {
655
+ method: 'PUT',
656
+ url: '/api/credentials/orgs/{platform_key}/users/{user_id}/assertions/{entity_id}',
657
+ path: {
658
+ 'entity_id': entityId,
659
+ 'platform_key': platformKey,
660
+ 'user_id': userId,
661
+ },
662
+ body: requestBody,
663
+ mediaType: 'application/json',
664
+ });
665
+ }
666
+ /**
667
+ * Delete a credential assignment using its entity_id.
668
+ * Only platform admins and department admins can delete assignments.
669
+ * @returns void
670
+ * @throws ApiError
671
+ */
672
+ public static credentialsOrgsUsersAssignmentsDestroy({
673
+ assignmentId,
674
+ platformKey,
675
+ userId,
676
+ }: {
677
+ assignmentId: string,
678
+ platformKey: string,
679
+ userId: number,
680
+ }): CancelablePromise<void> {
681
+ return __request(OpenAPI, {
682
+ method: 'DELETE',
683
+ url: '/api/credentials/orgs/{platform_key}/users/{user_id}/assignments/{assignment_id}',
684
+ path: {
685
+ 'assignment_id': assignmentId,
686
+ 'platform_key': platformKey,
687
+ 'user_id': userId,
688
+ },
689
+ });
690
+ }
691
+ /**
692
+ * Get group assignments with department-aware filtering
693
+ * @returns any No response body
694
+ * @throws ApiError
695
+ */
696
+ public static credentialsOrgsUsersAssignmentsGroupsRetrieve({
697
+ platformKey,
698
+ userId,
699
+ }: {
700
+ platformKey: string,
701
+ userId: number,
702
+ }): CancelablePromise<any> {
703
+ return __request(OpenAPI, {
704
+ method: 'GET',
705
+ url: '/api/credentials/orgs/{platform_key}/users/{user_id}/assignments/groups/',
706
+ path: {
707
+ 'platform_key': platformKey,
708
+ 'user_id': userId,
709
+ },
710
+ });
711
+ }
712
+ /**
713
+ * Create group assignment with department access validation
714
+ * @returns any No response body
715
+ * @throws ApiError
716
+ */
717
+ public static credentialsOrgsUsersAssignmentsGroupsCreate({
718
+ platformKey,
719
+ userId,
720
+ }: {
721
+ platformKey: string,
722
+ userId: number,
723
+ }): CancelablePromise<any> {
724
+ return __request(OpenAPI, {
725
+ method: 'POST',
726
+ url: '/api/credentials/orgs/{platform_key}/users/{user_id}/assignments/groups/',
727
+ path: {
728
+ 'platform_key': platformKey,
729
+ 'user_id': userId,
730
+ },
731
+ });
732
+ }
733
+ /**
734
+ * Get assignments and their corresponding assertions based on user role:
735
+ * - Regular users: get only their own assignments
736
+ * - Platform admins: get assignments for all users in their platform
737
+ * - Department admins: get assignments for users in their department groups
738
+ * @returns any No response body
739
+ * @throws ApiError
740
+ */
741
+ public static credentialsOrgsUsersAssignmentsUsersRetrieve({
742
+ platformKey,
743
+ userId,
744
+ }: {
745
+ platformKey: string,
746
+ userId: number,
747
+ }): CancelablePromise<any> {
748
+ return __request(OpenAPI, {
749
+ method: 'GET',
750
+ url: '/api/credentials/orgs/{platform_key}/users/{user_id}/assignments/users/',
751
+ path: {
752
+ 'platform_key': platformKey,
753
+ 'user_id': userId,
754
+ },
755
+ });
756
+ }
757
+ /**
758
+ * Create assignments with department access validation
759
+ * @returns any No response body
760
+ * @throws ApiError
761
+ */
762
+ public static credentialsOrgsUsersAssignmentsUsersCreate({
763
+ platformKey,
764
+ userId,
765
+ }: {
766
+ platformKey: string,
767
+ userId: number,
768
+ }): CancelablePromise<any> {
769
+ return __request(OpenAPI, {
770
+ method: 'POST',
771
+ url: '/api/credentials/orgs/{platform_key}/users/{user_id}/assignments/users/',
772
+ path: {
773
+ 'platform_key': platformKey,
774
+ 'user_id': userId,
775
+ },
776
+ });
777
+ }
778
+ /**
779
+ * Get all credentials of a given tenant
780
+ * @returns OverTime
781
+ * @throws ApiError
782
+ */
783
+ public static credentialsOrgsUsersCourseAssertionsOverTimeRetrieve({
784
+ platformKey,
785
+ userId,
786
+ departmentId,
787
+ endDate,
788
+ format = 'json',
789
+ includeMainPlatform = true,
790
+ startDate,
791
+ }: {
792
+ platformKey: string,
793
+ userId: number,
794
+ /**
795
+ * When `department_mode=1` is passed, it allows to filter data for only user content groups for the specified department
796
+ */
797
+ departmentId?: number,
798
+ /**
799
+ * end date. ISO 8601
800
+ */
801
+ endDate?: string,
802
+ /**
803
+ * Format
804
+ *
805
+ * * `json` - json
806
+ */
807
+ format?: 'json',
808
+ /**
809
+ * Include main platform data
810
+ */
811
+ includeMainPlatform?: boolean,
812
+ /**
813
+ * start date. ISO 8601
814
+ */
815
+ startDate?: string,
816
+ }): CancelablePromise<OverTime> {
817
+ return __request(OpenAPI, {
818
+ method: 'GET',
819
+ url: '/api/credentials/orgs/{platform_key}/users/{user_id}/course-assertions-over-time/',
820
+ path: {
821
+ 'platform_key': platformKey,
822
+ 'user_id': userId,
823
+ },
824
+ query: {
825
+ 'department_id': departmentId,
826
+ 'end_date': endDate,
827
+ 'format': format,
828
+ 'include_main_platform': includeMainPlatform,
829
+ 'start_date': startDate,
830
+ },
831
+ });
832
+ }
833
+ /**
834
+ * @returns any No response body
835
+ * @throws ApiError
836
+ */
837
+ public static credentialsOrgsUsersCourseCredentialsList({
838
+ platformKey,
839
+ userId,
840
+ page,
841
+ pageSize,
842
+ }: {
843
+ platformKey: string,
844
+ userId: number,
845
+ /**
846
+ * A page number within the paginated result set.
847
+ */
848
+ page?: number,
849
+ /**
850
+ * Number of results to return per page.
851
+ */
852
+ pageSize?: number,
853
+ }): CancelablePromise<any> {
854
+ return __request(OpenAPI, {
855
+ method: 'GET',
856
+ url: '/api/credentials/orgs/{platform_key}/users/{user_id}/course-credentials/',
857
+ path: {
858
+ 'platform_key': platformKey,
859
+ 'user_id': userId,
860
+ },
861
+ query: {
862
+ 'page': page,
863
+ 'page_size': pageSize,
864
+ },
865
+ });
866
+ }
867
+ /**
868
+ * Get all credentials of a given tenant
869
+ * @returns OverTime
870
+ * @throws ApiError
871
+ */
872
+ public static credentialsOrgsUsersCredentialsOverTimeRetrieve({
873
+ platformKey,
874
+ userId,
875
+ departmentId,
876
+ endDate,
877
+ format = 'json',
878
+ includeMainPlatform = true,
879
+ startDate,
880
+ }: {
881
+ platformKey: string,
882
+ userId: number,
883
+ /**
884
+ * When `department_mode=1` is passed, it allows to filter data for only user content groups for the specified department
885
+ */
886
+ departmentId?: number,
887
+ /**
888
+ * end date. ISO 8601
889
+ */
890
+ endDate?: string,
891
+ /**
892
+ * Format
893
+ *
894
+ * * `json` - json
895
+ */
896
+ format?: 'json',
897
+ /**
898
+ * Include main platform data
899
+ */
900
+ includeMainPlatform?: boolean,
901
+ /**
902
+ * start date. ISO 8601
903
+ */
904
+ startDate?: string,
905
+ }): CancelablePromise<OverTime> {
906
+ return __request(OpenAPI, {
907
+ method: 'GET',
908
+ url: '/api/credentials/orgs/{platform_key}/users/{user_id}/credentials-over-time/',
909
+ path: {
910
+ 'platform_key': platformKey,
911
+ 'user_id': userId,
912
+ },
913
+ query: {
914
+ 'department_id': departmentId,
915
+ 'end_date': endDate,
916
+ 'format': format,
917
+ 'include_main_platform': includeMainPlatform,
918
+ 'start_date': startDate,
919
+ },
920
+ });
921
+ }
922
+ /**
923
+ * Retrieve external credential mappings for the platform.
1205
924
  *
1206
925
  * Query Parameters:
1207
- * query (str, required for GET): Search term to filter images by name
926
+ * credential_id (str, optional): Filter by credential entity_id
927
+ * provider_name (str, optional): Filter by provider name
928
+ * page (int, optional): Page number
929
+ * page_size (int, optional): Items per page
1208
930
  *
1209
- * Methods:
1210
- * GET: Retrieve images matching a search query
1211
- * POST: Upload a new image
931
+ * Returns all mappings for the platform if the user is an admin.
932
+ * @returns ExternalCredentialMapping
933
+ * @throws ApiError
934
+ */
935
+ public static credentialsOrgsUsersExternalMappingRetrieve({
936
+ platformKey,
937
+ userId,
938
+ }: {
939
+ platformKey: string,
940
+ userId: number,
941
+ }): CancelablePromise<ExternalCredentialMapping> {
942
+ return __request(OpenAPI, {
943
+ method: 'GET',
944
+ url: '/api/credentials/orgs/{platform_key}/users/{user_id}/external-mapping/',
945
+ path: {
946
+ 'platform_key': platformKey,
947
+ 'user_id': userId,
948
+ },
949
+ });
950
+ }
951
+ /**
952
+ * Create or update an external credential mapping.
1212
953
  *
1213
- * POST Request Body:
1214
- * Multipart form data containing:
1215
- * - image (file, required): The image file to upload
1216
- * - name (str, optional): A descriptive name for the image
954
+ * If a mapping doesn't exist for the credential + platform + provider combination,
955
+ * it will be created. If it exists, it will be updated.
1217
956
  *
1218
- * Returns:
1219
- * GET: A JSON array of image objects:
1220
- * [
957
+ * Request Body:
958
+ * {
959
+ * "credential_id": "credential-entity-id", // Required
960
+ * "provider_name": "accredible", // Required
961
+ * "external_template_id": "123456", // Optional
962
+ * "metadata": {} // Optional
963
+ * }
964
+ *
965
+ * Returns:
966
+ * - 201 Created: When creating a new mapping
967
+ * - 200 OK: When updating an existing mapping
968
+ * @returns ExternalCredentialMapping
969
+ * @throws ApiError
970
+ */
971
+ public static credentialsOrgsUsersExternalMappingCreate({
972
+ platformKey,
973
+ userId,
974
+ requestBody,
975
+ }: {
976
+ platformKey: string,
977
+ userId: number,
978
+ requestBody: ExternalCredentialMapping,
979
+ }): CancelablePromise<ExternalCredentialMapping> {
980
+ return __request(OpenAPI, {
981
+ method: 'POST',
982
+ url: '/api/credentials/orgs/{platform_key}/users/{user_id}/external-mapping/',
983
+ path: {
984
+ 'platform_key': platformKey,
985
+ 'user_id': userId,
986
+ },
987
+ body: requestBody,
988
+ mediaType: 'application/json',
989
+ });
990
+ }
991
+ /**
992
+ * Delete an external credential mapping.
993
+ *
994
+ * Request Body:
1221
995
  * {
1222
- * "id": 123,
1223
- * "name": "Logo",
1224
- * "image": "https://example.com/media/uploaded_images/logo.png"
1225
- * },
996
+ * "credential_id": "credential-entity-id", // Required
997
+ * "provider_name": "accredible" // Required
998
+ * }
999
+ *
1000
+ * Returns:
1001
+ * A JSON response confirming deletion
1002
+ * @returns void
1003
+ * @throws ApiError
1004
+ */
1005
+ public static credentialsOrgsUsersExternalMappingDestroy({
1006
+ platformKey,
1007
+ userId,
1008
+ }: {
1009
+ platformKey: string,
1010
+ userId: number,
1011
+ }): CancelablePromise<void> {
1012
+ return __request(OpenAPI, {
1013
+ method: 'DELETE',
1014
+ url: '/api/credentials/orgs/{platform_key}/users/{user_id}/external-mapping/',
1015
+ path: {
1016
+ 'platform_key': platformKey,
1017
+ 'user_id': userId,
1018
+ },
1019
+ });
1020
+ }
1021
+ /**
1022
+ * @returns UploadedImage
1023
+ * @throws ApiError
1024
+ */
1025
+ public static credentialsOrgsUsersImagesRetrieve({
1026
+ platformKey,
1027
+ userId,
1028
+ }: {
1029
+ platformKey: string,
1030
+ userId: number,
1031
+ }): CancelablePromise<UploadedImage> {
1032
+ return __request(OpenAPI, {
1033
+ method: 'GET',
1034
+ url: '/api/credentials/orgs/{platform_key}/users/{user_id}/images/',
1035
+ path: {
1036
+ 'platform_key': platformKey,
1037
+ 'user_id': userId,
1038
+ },
1039
+ });
1040
+ }
1041
+ /**
1042
+ * @returns UploadedImage
1043
+ * @throws ApiError
1044
+ */
1045
+ public static credentialsOrgsUsersImagesCreate({
1046
+ platformKey,
1047
+ userId,
1048
+ requestBody,
1049
+ }: {
1050
+ platformKey: string,
1051
+ userId: number,
1052
+ requestBody?: UploadedImage,
1053
+ }): CancelablePromise<UploadedImage> {
1054
+ return __request(OpenAPI, {
1055
+ method: 'POST',
1056
+ url: '/api/credentials/orgs/{platform_key}/users/{user_id}/images/',
1057
+ path: {
1058
+ 'platform_key': platformKey,
1059
+ 'user_id': userId,
1060
+ },
1061
+ body: requestBody,
1062
+ mediaType: 'application/json',
1063
+ });
1064
+ }
1065
+ /**
1066
+ * A GET View that validates QueryParams and returns results to a serializer
1067
+ * @returns Issuer
1068
+ * @throws ApiError
1069
+ */
1070
+ public static credentialsOrgsUsersIssuersRetrieve({
1071
+ platformKey,
1072
+ q,
1073
+ userId,
1074
+ }: {
1075
+ platformKey: string,
1076
+ q: string,
1077
+ userId: number,
1078
+ }): CancelablePromise<Issuer> {
1079
+ return __request(OpenAPI, {
1080
+ method: 'GET',
1081
+ url: '/api/credentials/orgs/{platform_key}/users/{user_id}/issuers/',
1082
+ path: {
1083
+ 'platform_key': platformKey,
1084
+ 'user_id': userId,
1085
+ },
1086
+ query: {
1087
+ 'q': q,
1088
+ },
1089
+ });
1090
+ }
1091
+ /**
1092
+ * A GET View that validates QueryParams and returns results to a serializer
1093
+ * @returns Issuer
1094
+ * @throws ApiError
1095
+ */
1096
+ public static credentialsOrgsUsersIssuersCreate({
1097
+ platformKey,
1098
+ q,
1099
+ userId,
1100
+ requestBody,
1101
+ }: {
1102
+ platformKey: string,
1103
+ q: string,
1104
+ userId: number,
1105
+ requestBody: Issuer,
1106
+ }): CancelablePromise<Issuer> {
1107
+ return __request(OpenAPI, {
1108
+ method: 'POST',
1109
+ url: '/api/credentials/orgs/{platform_key}/users/{user_id}/issuers/',
1110
+ path: {
1111
+ 'platform_key': platformKey,
1112
+ 'user_id': userId,
1113
+ },
1114
+ query: {
1115
+ 'q': q,
1116
+ },
1117
+ body: requestBody,
1118
+ mediaType: 'application/json',
1119
+ });
1120
+ }
1121
+ /**
1122
+ * @returns Issuer
1123
+ * @throws ApiError
1124
+ */
1125
+ public static credentialsOrgsUsersIssuersRetrieve2({
1126
+ entityId,
1127
+ platformKey,
1128
+ userId,
1129
+ }: {
1130
+ entityId: string,
1131
+ platformKey: string,
1132
+ userId: number,
1133
+ }): CancelablePromise<Issuer> {
1134
+ return __request(OpenAPI, {
1135
+ method: 'GET',
1136
+ url: '/api/credentials/orgs/{platform_key}/users/{user_id}/issuers/{entity_id}',
1137
+ path: {
1138
+ 'entity_id': entityId,
1139
+ 'platform_key': platformKey,
1140
+ 'user_id': userId,
1141
+ },
1142
+ });
1143
+ }
1144
+ /**
1145
+ * @returns Issuer
1146
+ * @throws ApiError
1147
+ */
1148
+ public static credentialsOrgsUsersIssuersUpdate({
1149
+ entityId,
1150
+ platformKey,
1151
+ userId,
1152
+ requestBody,
1153
+ }: {
1154
+ entityId: string,
1155
+ platformKey: string,
1156
+ userId: number,
1157
+ requestBody: Issuer,
1158
+ }): CancelablePromise<Issuer> {
1159
+ return __request(OpenAPI, {
1160
+ method: 'PUT',
1161
+ url: '/api/credentials/orgs/{platform_key}/users/{user_id}/issuers/{entity_id}',
1162
+ path: {
1163
+ 'entity_id': entityId,
1164
+ 'platform_key': platformKey,
1165
+ 'user_id': userId,
1166
+ },
1167
+ body: requestBody,
1168
+ mediaType: 'application/json',
1169
+ });
1170
+ }
1171
+ /**
1172
+ * @returns void
1173
+ * @throws ApiError
1174
+ */
1175
+ public static credentialsOrgsUsersIssuersDestroy({
1176
+ entityId,
1177
+ platformKey,
1178
+ userId,
1179
+ }: {
1180
+ entityId: string,
1181
+ platformKey: string,
1182
+ userId: number,
1183
+ }): CancelablePromise<void> {
1184
+ return __request(OpenAPI, {
1185
+ method: 'DELETE',
1186
+ url: '/api/credentials/orgs/{platform_key}/users/{user_id}/issuers/{entity_id}',
1187
+ path: {
1188
+ 'entity_id': entityId,
1189
+ 'platform_key': platformKey,
1190
+ 'user_id': userId,
1191
+ },
1192
+ });
1193
+ }
1194
+ /**
1195
+ * @returns IssuerAuthority
1196
+ * @throws ApiError
1197
+ */
1198
+ public static credentialsOrgsUsersIssuersAuthorityCreate({
1199
+ platformKey,
1200
+ userId,
1201
+ requestBody,
1202
+ }: {
1203
+ platformKey: string,
1204
+ userId: number,
1205
+ requestBody: IssuerAuthority,
1206
+ }): CancelablePromise<IssuerAuthority> {
1207
+ return __request(OpenAPI, {
1208
+ method: 'POST',
1209
+ url: '/api/credentials/orgs/{platform_key}/users/{user_id}/issuers/authority/',
1210
+ path: {
1211
+ 'platform_key': platformKey,
1212
+ 'user_id': userId,
1213
+ },
1214
+ body: requestBody,
1215
+ mediaType: 'application/json',
1216
+ });
1217
+ }
1218
+ /**
1219
+ * Retrieve provider configurations for the platform.
1220
+ *
1221
+ * Query Parameters:
1222
+ * provider_name (str, optional): Filter to a specific provider
1223
+ * page (int, optional): Page number
1224
+ * page_size (int, optional): Items per page
1225
+ *
1226
+ * Returns all configurations for the platform if the user is an admin.
1227
+ * @returns CredentialProviderConfig
1228
+ * @throws ApiError
1229
+ */
1230
+ public static credentialsOrgsUsersProviderConfigRetrieve({
1231
+ platformKey,
1232
+ userId,
1233
+ }: {
1234
+ platformKey: string,
1235
+ userId: number,
1236
+ }): CancelablePromise<CredentialProviderConfig> {
1237
+ return __request(OpenAPI, {
1238
+ method: 'GET',
1239
+ url: '/api/credentials/orgs/{platform_key}/users/{user_id}/provider-config/',
1240
+ path: {
1241
+ 'platform_key': platformKey,
1242
+ 'user_id': userId,
1243
+ },
1244
+ });
1245
+ }
1246
+ /**
1247
+ * Create or update a provider configuration.
1248
+ *
1249
+ * If a configuration doesn't exist for the platform and provider, it will be created.
1250
+ * If it exists, it will be updated.
1251
+ *
1252
+ * Request Body:
1226
1253
  * {
1227
- * "id": 124,
1228
- * "name": "Background",
1229
- * "image": "https://example.com/media/uploaded_images/background.jpg"
1230
- * },
1231
- * ...
1232
- * ]
1254
+ * "provider_name": "accredible", // Required
1255
+ * "config": {...}, // Optional
1256
+ * "enabled": true // Optional
1257
+ * }
1258
+ *
1259
+ * Returns:
1260
+ * - 201 Created: When creating a new configuration
1261
+ * - 200 OK: When updating an existing configuration
1262
+ * @returns CredentialProviderConfig
1263
+ * @throws ApiError
1264
+ */
1265
+ public static credentialsOrgsUsersProviderConfigCreate({
1266
+ platformKey,
1267
+ userId,
1268
+ requestBody,
1269
+ }: {
1270
+ platformKey: string,
1271
+ userId: number,
1272
+ requestBody: CredentialProviderConfig,
1273
+ }): CancelablePromise<CredentialProviderConfig> {
1274
+ return __request(OpenAPI, {
1275
+ method: 'POST',
1276
+ url: '/api/credentials/orgs/{platform_key}/users/{user_id}/provider-config/',
1277
+ path: {
1278
+ 'platform_key': platformKey,
1279
+ 'user_id': userId,
1280
+ },
1281
+ body: requestBody,
1282
+ mediaType: 'application/json',
1283
+ });
1284
+ }
1285
+ /**
1286
+ * Deactivate a provider configuration (sets enabled=False).
1233
1287
  *
1234
- * POST: A JSON object containing the uploaded image details:
1288
+ * Request Body:
1235
1289
  * {
1236
- * "id": 125,
1237
- * "name": "Certificate Icon",
1238
- * "image": "https://example.com/media/uploaded_images/certificate-icon.png"
1290
+ * "provider_name": "accredible" // Required
1239
1291
  * }
1292
+ * @returns void
1293
+ * @throws ApiError
1294
+ */
1295
+ public static credentialsOrgsUsersProviderConfigDestroy({
1296
+ platformKey,
1297
+ userId,
1298
+ }: {
1299
+ platformKey: string,
1300
+ userId: number,
1301
+ }): CancelablePromise<void> {
1302
+ return __request(OpenAPI, {
1303
+ method: 'DELETE',
1304
+ url: '/api/credentials/orgs/{platform_key}/users/{user_id}/provider-config/',
1305
+ path: {
1306
+ 'platform_key': platformKey,
1307
+ 'user_id': userId,
1308
+ },
1309
+ });
1310
+ }
1311
+ /**
1312
+ * Get all credentials for a platform with search and pagination support.
1240
1313
  *
1241
- * Error Responses:
1242
- * 400 Bad Request: If the request data is invalid or missing required parameters
1243
- * 401 Unauthorized: If the user is not authenticated
1244
- * 403 Forbidden: If the user does not have permission to access this resource
1245
- * 500 Internal Server Error: If an unexpected error occurs
1246
- *
1247
- * Access Control:
1248
- * - Requires IsAdminUserOrStudentDRFMixin
1249
- * - Only authenticated users with appropriate permissions can upload and retrieve images
1250
- * @returns UploadedImage
1314
+ * Query Parameters:
1315
+ * - platform_org: Platform org ID (takes precedence over URL org)
1316
+ * - page: Page number (default: 1)
1317
+ * - page_size: Items per page (default: 10, max: 100)
1318
+ * - search: Search term to filter credentials
1319
+ * - course: Course ID to filter credentials
1320
+ * - program: Program ID to filter credentials
1321
+ * @returns Credential
1251
1322
  * @throws ApiError
1252
1323
  */
1253
- public static credentialsOrgsUsersImagesRetrieve({
1324
+ public static credentialsOrgsUsersRetrieve3({
1254
1325
  platformKey,
1255
1326
  username,
1256
1327
  }: {
1257
1328
  platformKey: string,
1258
1329
  username: string,
1259
- }): CancelablePromise<UploadedImage> {
1330
+ }): CancelablePromise<Credential> {
1260
1331
  return __request(OpenAPI, {
1261
1332
  method: 'GET',
1262
- url: '/api/credentials/orgs/{platform_key}/users/{username}/images/',
1333
+ url: '/api/credentials/orgs/{platform_key}/users/{username}/',
1263
1334
  path: {
1264
1335
  'platform_key': platformKey,
1265
1336
  'username': username,
@@ -1267,74 +1338,97 @@ export class CredentialsService {
1267
1338
  });
1268
1339
  }
1269
1340
  /**
1270
- * API View for managing uploaded images for credentials.
1341
+ * API View for managing credentials across a platform.
1271
1342
  *
1272
- * This endpoint allows uploading new images and retrieving existing images
1273
- * for use with credentials (icons, backgrounds, thumbnails, etc.).
1343
+ * This endpoint allows creating and retrieving credentials for a specific organization/tenant,
1344
+ * with support for filtering, searching, and pagination.
1274
1345
  *
1275
1346
  * Path Parameters:
1276
1347
  * org (str): The organization/tenant identifier
1277
1348
  * user_id (str): The user ID making the request
1278
1349
  *
1279
1350
  * Query Parameters:
1280
- * query (str, required for GET): Search term to filter images by name
1351
+ * # Platform identification
1352
+ * platform_org (str, optional): Alternative platform identifier (takes precedence over URL org)
1353
+ *
1354
+ * # Pagination
1355
+ * page (int, optional): Page number (default: 1)
1356
+ * page_size (int, optional): Items per page (default: 10, max: 100)
1357
+ *
1358
+ * # Filtering and search
1359
+ * search (str, optional): Search term to filter credentials by name or description
1360
+ * course (str, optional): Course ID to filter credentials associated with a specific course
1361
+ * program (str, optional): Program ID to filter credentials associated with a specific program
1281
1362
  *
1282
1363
  * Methods:
1283
- * GET: Retrieve images matching a search query
1284
- * POST: Upload a new image
1364
+ * GET: Retrieve credentials with filtering and pagination
1365
+ * POST: Create a new credential
1285
1366
  *
1286
1367
  * POST Request Body:
1287
- * Multipart form data containing:
1288
- * - image (file, required): The image file to upload
1289
- * - name (str, optional): A descriptive name for the image
1368
+ * A JSON object containing credential details:
1369
+ * - name (str): Credential name
1370
+ * - description (str, optional): Credential description
1371
+ * - issuer (str): Issuer entity ID
1372
+ * - credential_type (str, optional): Type of credential
1373
+ * - html_template (str, optional): HTML template for credential rendering
1374
+ * - css_template (str, optional): CSS template for credential styling
1375
+ * - icon_image (str, optional): URL to credential icon
1376
+ * - background_image (str, optional): URL to credential background
1377
+ * - thumbnail_image (str, optional): URL to credential thumbnail
1378
+ * - criteria_url (str, optional): URL to credential criteria
1379
+ * - criteria_text (str, optional): Text description of credential criteria
1380
+ * - issuing_signal (str, optional): Signal that triggers credential issuance
1290
1381
  *
1291
1382
  * Returns:
1292
- * GET: A JSON array of image objects:
1293
- * [
1294
- * {
1295
- * "id": 123,
1296
- * "name": "Logo",
1297
- * "image": "https://example.com/media/uploaded_images/logo.png"
1298
- * },
1299
- * {
1300
- * "id": 124,
1301
- * "name": "Background",
1302
- * "image": "https://example.com/media/uploaded_images/background.jpg"
1303
- * },
1383
+ * GET: A JSON response containing:
1384
+ * {
1385
+ * "status": {"success": true, "description": "Ok"},
1386
+ * "result": {
1387
+ * "next": "URL to next page",
1388
+ * "previous": "URL to previous page",
1389
+ * "count": 42,
1390
+ * "data": [
1391
+ * {credential object},
1392
+ * {credential object},
1304
1393
  * ...
1305
- * ]
1394
+ * ],
1395
+ * "num_pages": 5,
1396
+ * "page_number": 1,
1397
+ * "max_page_size": 100
1398
+ * }
1399
+ * }
1306
1400
  *
1307
- * POST: A JSON object containing the uploaded image details:
1401
+ * POST: A JSON response containing:
1308
1402
  * {
1309
- * "id": 125,
1310
- * "name": "Certificate Icon",
1311
- * "image": "https://example.com/media/uploaded_images/certificate-icon.png"
1403
+ * "status": {"success": true, "description": "Created"},
1404
+ * "result": {credential object}
1312
1405
  * }
1313
1406
  *
1314
1407
  * Error Responses:
1315
- * 400 Bad Request: If the request data is invalid or missing required parameters
1408
+ * 400 Bad Request: If the request data is invalid
1316
1409
  * 401 Unauthorized: If the user is not authenticated
1317
1410
  * 403 Forbidden: If the user does not have permission to access this resource
1411
+ * 404 Not Found: If the platform doesn't exist
1318
1412
  * 500 Internal Server Error: If an unexpected error occurs
1319
1413
  *
1320
1414
  * Access Control:
1321
- * - Requires IsAdminUserOrStudentDRFMixin
1322
- * - Only authenticated users with appropriate permissions can upload and retrieve images
1323
- * @returns UploadedImage
1415
+ * - Requires CredentialAssignmentPermission
1416
+ * - Only public credentials are returned by default
1417
+ * @returns Credential
1324
1418
  * @throws ApiError
1325
1419
  */
1326
- public static credentialsOrgsUsersImagesCreate({
1420
+ public static credentialsOrgsUsersCreate2({
1327
1421
  platformKey,
1328
1422
  username,
1329
1423
  requestBody,
1330
1424
  }: {
1331
1425
  platformKey: string,
1332
1426
  username: string,
1333
- requestBody?: UploadedImage,
1334
- }): CancelablePromise<UploadedImage> {
1427
+ requestBody: Credential,
1428
+ }): CancelablePromise<Credential> {
1335
1429
  return __request(OpenAPI, {
1336
1430
  method: 'POST',
1337
- url: '/api/credentials/orgs/{platform_key}/users/{username}/images/',
1431
+ url: '/api/credentials/orgs/{platform_key}/users/{username}/',
1338
1432
  path: {
1339
1433
  'platform_key': platformKey,
1340
1434
  'username': username,
@@ -1344,649 +1438,1159 @@ export class CredentialsService {
1344
1438
  });
1345
1439
  }
1346
1440
  /**
1347
- * API View for managing credential issuers.
1441
+ * API View for managing individual credentials.
1348
1442
  *
1349
- * This endpoint allows creating and retrieving issuers for a specific organization/tenant,
1350
- * with support for filtering and pagination.
1443
+ * This endpoint allows retrieving, updating, and deleting specific credentials
1444
+ * identified by their entity_id.
1351
1445
  *
1352
1446
  * Path Parameters:
1353
1447
  * org (str): The organization/tenant identifier
1354
1448
  * user_id (str): The user ID making the request
1355
- *
1356
- * Query Parameters:
1357
- * q (str, optional): Search term to filter issuers by name
1358
- * limit (int, optional): Number of results per page (default: 50)
1359
- * offset (int, optional): Starting position for pagination
1449
+ * entity_id (str): The credential entity ID
1360
1450
  *
1361
1451
  * Methods:
1362
- * GET: Retrieve issuers with filtering and pagination
1363
- * POST: Create a new issuer
1452
+ * GET: Retrieve a specific credential
1453
+ * PUT: Update a specific credential
1454
+ * DELETE: Delete a specific credential
1364
1455
  *
1365
- * POST Request Body:
1366
- * A JSON object containing issuer details:
1367
- * - name (str): Issuer name
1368
- * - iconImage (str, optional): URL to issuer icon
1369
- * - email (str, optional): Contact email for the issuer
1370
- * - url (str, optional): Website URL for the issuer
1371
- * - allowed_template_tags (array, optional): List of allowed template tags
1456
+ * PUT Request Body:
1457
+ * A JSON object containing credential details to update:
1458
+ * - name (str, optional): Credential name
1459
+ * - description (str, optional): Credential description
1460
+ * - credential_type (str, optional): Type of credential
1461
+ * - html_template (str, optional): HTML template for credential rendering
1462
+ * - css_template (str, optional): CSS template for credential styling
1463
+ * - icon_image (str, optional): URL to credential icon
1464
+ * - background_image (str, optional): URL to credential background
1465
+ * - thumbnail_image (str, optional): URL to credential thumbnail
1466
+ * - criteria_url (str, optional): URL to credential criteria
1467
+ * - criteria_text (str, optional): Text description of credential criteria
1468
+ * - issuing_signal (str, optional): Signal that triggers credential issuance
1372
1469
  *
1373
1470
  * Returns:
1374
1471
  * GET: A JSON response containing:
1375
1472
  * {
1376
1473
  * "status": {"success": true, "description": "Ok"},
1377
- * "result": {
1378
- * "next": "URL to next page",
1379
- * "previous": "URL to previous page",
1380
- * "count": 10,
1381
- * "data": [
1382
- * {issuer object},
1383
- * {issuer object},
1384
- * ...
1385
- * ],
1386
- * "num_pages": 1,
1387
- * "page_number": 1,
1388
- * "max_page_size": 1000
1389
- * }
1474
+ * "result": {credential object}
1475
+ * }
1476
+ *
1477
+ * PUT: A JSON response containing:
1478
+ * {
1479
+ * "status": {"success": true, "description": "Updated"},
1480
+ * "result": {credential object}
1481
+ * }
1482
+ *
1483
+ * DELETE: A JSON response indicating success:
1484
+ * {
1485
+ * "status": {"success": true, "description": "Deleted"}
1390
1486
  * }
1391
1487
  *
1392
- * POST: A JSON response containing:
1488
+ * Error Responses:
1489
+ * 400 Bad Request: If the request data is invalid
1490
+ * 401 Unauthorized: If the user is not authenticated
1491
+ * 403 Forbidden: If the user does not have permission to access this resource
1492
+ * 404 Not Found: If the credential doesn't exist
1493
+ * 500 Internal Server Error: If an unexpected error occurs
1494
+ *
1495
+ * Access Control:
1496
+ * - Requires CredentialAssignmentPermission
1497
+ * - Users can only manage credentials they have permission to access
1498
+ * @returns Credential
1499
+ * @throws ApiError
1500
+ */
1501
+ public static credentialsOrgsUsersRetrieve4({
1502
+ entityId,
1503
+ platformKey,
1504
+ username,
1505
+ }: {
1506
+ entityId: string,
1507
+ platformKey: string,
1508
+ username: string,
1509
+ }): CancelablePromise<Credential> {
1510
+ return __request(OpenAPI, {
1511
+ method: 'GET',
1512
+ url: '/api/credentials/orgs/{platform_key}/users/{username}/{entity_id}',
1513
+ path: {
1514
+ 'entity_id': entityId,
1515
+ 'platform_key': platformKey,
1516
+ 'username': username,
1517
+ },
1518
+ });
1519
+ }
1520
+ /**
1521
+ * API View for managing individual credentials.
1522
+ *
1523
+ * This endpoint allows retrieving, updating, and deleting specific credentials
1524
+ * identified by their entity_id.
1525
+ *
1526
+ * Path Parameters:
1527
+ * org (str): The organization/tenant identifier
1528
+ * user_id (str): The user ID making the request
1529
+ * entity_id (str): The credential entity ID
1530
+ *
1531
+ * Methods:
1532
+ * GET: Retrieve a specific credential
1533
+ * PUT: Update a specific credential
1534
+ * DELETE: Delete a specific credential
1535
+ *
1536
+ * PUT Request Body:
1537
+ * A JSON object containing credential details to update:
1538
+ * - name (str, optional): Credential name
1539
+ * - description (str, optional): Credential description
1540
+ * - credential_type (str, optional): Type of credential
1541
+ * - html_template (str, optional): HTML template for credential rendering
1542
+ * - css_template (str, optional): CSS template for credential styling
1543
+ * - icon_image (str, optional): URL to credential icon
1544
+ * - background_image (str, optional): URL to credential background
1545
+ * - thumbnail_image (str, optional): URL to credential thumbnail
1546
+ * - criteria_url (str, optional): URL to credential criteria
1547
+ * - criteria_text (str, optional): Text description of credential criteria
1548
+ * - issuing_signal (str, optional): Signal that triggers credential issuance
1549
+ *
1550
+ * Returns:
1551
+ * GET: A JSON response containing:
1393
1552
  * {
1394
- * "status": {"success": true, "description": "Created"},
1395
- * "result": {issuer object}
1553
+ * "status": {"success": true, "description": "Ok"},
1554
+ * "result": {credential object}
1396
1555
  * }
1397
1556
  *
1398
- * Error Responses:
1399
- * 400 Bad Request: If the request data is invalid
1400
- * 401 Unauthorized: If the user is not authenticated
1401
- * 403 Forbidden: If the user does not have permission to access this resource
1402
- * 404 Not Found: If the platform doesn't exist
1403
- * 500 Internal Server Error: If an unexpected error occurs
1404
- *
1405
- * Access Control:
1406
- * - Requires IsAdminUserOrStudentDRFMixin
1407
- * - Only authenticated users with appropriate permissions can manage issuers
1408
- * @returns Issuer
1409
- * @throws ApiError
1410
- */
1411
- public static credentialsOrgsUsersIssuersRetrieve({
1412
- platformKey,
1413
- q,
1414
- username,
1415
- }: {
1416
- platformKey: string,
1417
- q: string,
1418
- username: string,
1419
- }): CancelablePromise<Issuer> {
1420
- return __request(OpenAPI, {
1421
- method: 'GET',
1422
- url: '/api/credentials/orgs/{platform_key}/users/{username}/issuers/',
1423
- path: {
1424
- 'platform_key': platformKey,
1425
- 'username': username,
1426
- },
1427
- query: {
1428
- 'q': q,
1429
- },
1430
- });
1431
- }
1432
- /**
1433
- * API View for managing credential issuers.
1434
- *
1435
- * This endpoint allows creating and retrieving issuers for a specific organization/tenant,
1436
- * with support for filtering and pagination.
1437
- *
1438
- * Path Parameters:
1439
- * org (str): The organization/tenant identifier
1440
- * user_id (str): The user ID making the request
1441
- *
1442
- * Query Parameters:
1443
- * q (str, optional): Search term to filter issuers by name
1444
- * limit (int, optional): Number of results per page (default: 50)
1445
- * offset (int, optional): Starting position for pagination
1446
- *
1447
- * Methods:
1448
- * GET: Retrieve issuers with filtering and pagination
1449
- * POST: Create a new issuer
1450
- *
1451
- * POST Request Body:
1452
- * A JSON object containing issuer details:
1453
- * - name (str): Issuer name
1454
- * - iconImage (str, optional): URL to issuer icon
1455
- * - email (str, optional): Contact email for the issuer
1456
- * - url (str, optional): Website URL for the issuer
1457
- * - allowed_template_tags (array, optional): List of allowed template tags
1458
- *
1459
- * Returns:
1460
- * GET: A JSON response containing:
1557
+ * PUT: A JSON response containing:
1461
1558
  * {
1462
- * "status": {"success": true, "description": "Ok"},
1463
- * "result": {
1464
- * "next": "URL to next page",
1465
- * "previous": "URL to previous page",
1466
- * "count": 10,
1467
- * "data": [
1468
- * {issuer object},
1469
- * {issuer object},
1470
- * ...
1471
- * ],
1472
- * "num_pages": 1,
1473
- * "page_number": 1,
1474
- * "max_page_size": 1000
1475
- * }
1559
+ * "status": {"success": true, "description": "Updated"},
1560
+ * "result": {credential object}
1561
+ * }
1562
+ *
1563
+ * DELETE: A JSON response indicating success:
1564
+ * {
1565
+ * "status": {"success": true, "description": "Deleted"}
1566
+ * }
1567
+ *
1568
+ * Error Responses:
1569
+ * 400 Bad Request: If the request data is invalid
1570
+ * 401 Unauthorized: If the user is not authenticated
1571
+ * 403 Forbidden: If the user does not have permission to access this resource
1572
+ * 404 Not Found: If the credential doesn't exist
1573
+ * 500 Internal Server Error: If an unexpected error occurs
1574
+ *
1575
+ * Access Control:
1576
+ * - Requires CredentialAssignmentPermission
1577
+ * - Users can only manage credentials they have permission to access
1578
+ * @returns Credential
1579
+ * @throws ApiError
1580
+ */
1581
+ public static credentialsOrgsUsersUpdate2({
1582
+ entityId,
1583
+ platformKey,
1584
+ username,
1585
+ requestBody,
1586
+ }: {
1587
+ entityId: string,
1588
+ platformKey: string,
1589
+ username: string,
1590
+ requestBody: Credential,
1591
+ }): CancelablePromise<Credential> {
1592
+ return __request(OpenAPI, {
1593
+ method: 'PUT',
1594
+ url: '/api/credentials/orgs/{platform_key}/users/{username}/{entity_id}',
1595
+ path: {
1596
+ 'entity_id': entityId,
1597
+ 'platform_key': platformKey,
1598
+ 'username': username,
1599
+ },
1600
+ body: requestBody,
1601
+ mediaType: 'application/json',
1602
+ });
1603
+ }
1604
+ /**
1605
+ * API View for managing individual credentials.
1606
+ *
1607
+ * This endpoint allows retrieving, updating, and deleting specific credentials
1608
+ * identified by their entity_id.
1609
+ *
1610
+ * Path Parameters:
1611
+ * org (str): The organization/tenant identifier
1612
+ * user_id (str): The user ID making the request
1613
+ * entity_id (str): The credential entity ID
1614
+ *
1615
+ * Methods:
1616
+ * GET: Retrieve a specific credential
1617
+ * PUT: Update a specific credential
1618
+ * DELETE: Delete a specific credential
1619
+ *
1620
+ * PUT Request Body:
1621
+ * A JSON object containing credential details to update:
1622
+ * - name (str, optional): Credential name
1623
+ * - description (str, optional): Credential description
1624
+ * - credential_type (str, optional): Type of credential
1625
+ * - html_template (str, optional): HTML template for credential rendering
1626
+ * - css_template (str, optional): CSS template for credential styling
1627
+ * - icon_image (str, optional): URL to credential icon
1628
+ * - background_image (str, optional): URL to credential background
1629
+ * - thumbnail_image (str, optional): URL to credential thumbnail
1630
+ * - criteria_url (str, optional): URL to credential criteria
1631
+ * - criteria_text (str, optional): Text description of credential criteria
1632
+ * - issuing_signal (str, optional): Signal that triggers credential issuance
1633
+ *
1634
+ * Returns:
1635
+ * GET: A JSON response containing:
1636
+ * {
1637
+ * "status": {"success": true, "description": "Ok"},
1638
+ * "result": {credential object}
1476
1639
  * }
1477
1640
  *
1478
- * POST: A JSON response containing:
1641
+ * PUT: A JSON response containing:
1479
1642
  * {
1480
- * "status": {"success": true, "description": "Created"},
1481
- * "result": {issuer object}
1643
+ * "status": {"success": true, "description": "Updated"},
1644
+ * "result": {credential object}
1482
1645
  * }
1483
1646
  *
1484
- * Error Responses:
1485
- * 400 Bad Request: If the request data is invalid
1486
- * 401 Unauthorized: If the user is not authenticated
1487
- * 403 Forbidden: If the user does not have permission to access this resource
1488
- * 404 Not Found: If the platform doesn't exist
1489
- * 500 Internal Server Error: If an unexpected error occurs
1490
- *
1491
- * Access Control:
1492
- * - Requires IsAdminUserOrStudentDRFMixin
1493
- * - Only authenticated users with appropriate permissions can manage issuers
1494
- * @returns Issuer
1495
- * @throws ApiError
1496
- */
1497
- public static credentialsOrgsUsersIssuersCreate({
1498
- platformKey,
1499
- q,
1500
- username,
1501
- requestBody,
1502
- }: {
1503
- platformKey: string,
1504
- q: string,
1505
- username: string,
1506
- requestBody: Issuer,
1507
- }): CancelablePromise<Issuer> {
1508
- return __request(OpenAPI, {
1509
- method: 'POST',
1510
- url: '/api/credentials/orgs/{platform_key}/users/{username}/issuers/',
1511
- path: {
1512
- 'platform_key': platformKey,
1513
- 'username': username,
1514
- },
1515
- query: {
1516
- 'q': q,
1517
- },
1518
- body: requestBody,
1519
- mediaType: 'application/json',
1520
- });
1521
- }
1522
- /**
1523
- * API View for managing individual issuers.
1524
- *
1525
- * This endpoint allows retrieving, updating, and deleting specific issuers
1526
- * identified by their entity_id or org identifier.
1527
- *
1528
- * Path Parameters:
1529
- * org (str): The organization/tenant identifier
1530
- * user_id (str): The user ID making the request
1531
- * entity_id (str): The issuer entity ID or org identifier
1532
- *
1533
- * Methods:
1534
- * GET: Retrieve a specific issuer
1535
- * PUT: Update a specific issuer
1536
- * DELETE: Delete a specific issuer
1537
- *
1538
- * PUT Request Body:
1539
- * A JSON object containing issuer details to update:
1540
- * - name (str, optional): Issuer name
1541
- * - iconImage (str, optional): URL to issuer icon
1542
- * - email (str, optional): Contact email for the issuer
1543
- * - url (str, optional): Website URL for the issuer
1544
- * - allowed_template_tags (array, optional): List of allowed template tags
1545
- *
1546
- * Returns:
1547
- * GET: A JSON response containing the issuer details:
1548
- * [
1647
+ * DELETE: A JSON response indicating success:
1648
+ * {
1649
+ * "status": {"success": true, "description": "Deleted"}
1650
+ * }
1651
+ *
1652
+ * Error Responses:
1653
+ * 400 Bad Request: If the request data is invalid
1654
+ * 401 Unauthorized: If the user is not authenticated
1655
+ * 403 Forbidden: If the user does not have permission to access this resource
1656
+ * 404 Not Found: If the credential doesn't exist
1657
+ * 500 Internal Server Error: If an unexpected error occurs
1658
+ *
1659
+ * Access Control:
1660
+ * - Requires CredentialAssignmentPermission
1661
+ * - Users can only manage credentials they have permission to access
1662
+ * @returns void
1663
+ * @throws ApiError
1664
+ */
1665
+ public static credentialsOrgsUsersDestroy2({
1666
+ entityId,
1667
+ platformKey,
1668
+ username,
1669
+ }: {
1670
+ entityId: string,
1671
+ platformKey: string,
1672
+ username: string,
1673
+ }): CancelablePromise<void> {
1674
+ return __request(OpenAPI, {
1675
+ method: 'DELETE',
1676
+ url: '/api/credentials/orgs/{platform_key}/users/{username}/{entity_id}',
1677
+ path: {
1678
+ 'entity_id': entityId,
1679
+ 'platform_key': platformKey,
1680
+ 'username': username,
1681
+ },
1682
+ });
1683
+ }
1684
+ /**
1685
+ * @returns PaginatedAssertionsResponse
1686
+ * @throws ApiError
1687
+ */
1688
+ public static credentialsOrgsUsersAssertionsRetrieve6({
1689
+ entityId,
1690
+ platformKey,
1691
+ username,
1692
+ }: {
1693
+ entityId: string,
1694
+ platformKey: string,
1695
+ username: string,
1696
+ }): CancelablePromise<PaginatedAssertionsResponse> {
1697
+ return __request(OpenAPI, {
1698
+ method: 'GET',
1699
+ url: '/api/credentials/orgs/{platform_key}/users/{username}/{entity_id}/assertions/',
1700
+ path: {
1701
+ 'entity_id': entityId,
1702
+ 'platform_key': platformKey,
1703
+ 'username': username,
1704
+ },
1705
+ });
1706
+ }
1707
+ /**
1708
+ * @returns Assertion
1709
+ * @throws ApiError
1710
+ */
1711
+ public static credentialsOrgsUsersAssertionsCreate2({
1712
+ entityId,
1713
+ platformKey,
1714
+ username,
1715
+ requestBody,
1716
+ }: {
1717
+ entityId: string,
1718
+ platformKey: string,
1719
+ username: string,
1720
+ requestBody: Assertion,
1721
+ }): CancelablePromise<Assertion> {
1722
+ return __request(OpenAPI, {
1723
+ method: 'POST',
1724
+ url: '/api/credentials/orgs/{platform_key}/users/{username}/{entity_id}/assertions/',
1725
+ path: {
1726
+ 'entity_id': entityId,
1727
+ 'platform_key': platformKey,
1728
+ 'username': username,
1729
+ },
1730
+ body: requestBody,
1731
+ mediaType: 'application/json',
1732
+ });
1733
+ }
1734
+ /**
1735
+ * @returns BulkCreateAssertion
1736
+ * @throws ApiError
1737
+ */
1738
+ public static credentialsOrgsUsersAssertionsBulkCreate2({
1739
+ entityId,
1740
+ platformKey,
1741
+ username,
1742
+ requestBody,
1743
+ }: {
1744
+ entityId: string,
1745
+ platformKey: string,
1746
+ username: string,
1747
+ requestBody: BulkCreateAssertion,
1748
+ }): CancelablePromise<BulkCreateAssertion> {
1749
+ return __request(OpenAPI, {
1750
+ method: 'POST',
1751
+ url: '/api/credentials/orgs/{platform_key}/users/{username}/{entity_id}/assertions/bulk/',
1752
+ path: {
1753
+ 'entity_id': entityId,
1754
+ 'platform_key': platformKey,
1755
+ 'username': username,
1756
+ },
1757
+ body: requestBody,
1758
+ mediaType: 'application/json',
1759
+ });
1760
+ }
1761
+ /**
1762
+ * A GET View that validates QueryParams and returns results to a serializer
1763
+ * @returns PaginatedAssertionsResponse
1764
+ * @throws ApiError
1765
+ */
1766
+ public static credentialsOrgsUsersAssertionsRetrieve4({
1767
+ platformKey,
1768
+ username,
1769
+ course,
1770
+ excludeMainTenantAssertions,
1771
+ includeExpired,
1772
+ includeRevoked,
1773
+ page,
1774
+ pageSize,
1775
+ }: {
1776
+ platformKey: string,
1777
+ username: string,
1778
+ course?: string,
1779
+ excludeMainTenantAssertions?: boolean,
1780
+ includeExpired?: boolean,
1781
+ includeRevoked?: boolean,
1782
+ page?: number,
1783
+ pageSize?: number,
1784
+ }): CancelablePromise<PaginatedAssertionsResponse> {
1785
+ return __request(OpenAPI, {
1786
+ method: 'GET',
1787
+ url: '/api/credentials/orgs/{platform_key}/users/{username}/assertions/',
1788
+ path: {
1789
+ 'platform_key': platformKey,
1790
+ 'username': username,
1791
+ },
1792
+ query: {
1793
+ 'course': course,
1794
+ 'exclude_main_tenant_assertions': excludeMainTenantAssertions,
1795
+ 'include_expired': includeExpired,
1796
+ 'include_revoked': includeRevoked,
1797
+ 'page': page,
1798
+ 'page_size': pageSize,
1799
+ },
1800
+ });
1801
+ }
1802
+ /**
1803
+ * Get all credentials of a given tenant
1804
+ * @returns OvertimeWithChangeInfo
1805
+ * @throws ApiError
1806
+ */
1807
+ public static credentialsOrgsUsersAssertionsOverTimeRetrieve2({
1808
+ platformKey,
1809
+ username,
1810
+ departmentId,
1811
+ endDate,
1812
+ format = 'json',
1813
+ includeMainPlatform = true,
1814
+ startDate,
1815
+ }: {
1816
+ platformKey: string,
1817
+ username: string,
1818
+ /**
1819
+ * When `department_mode=1` is passed, it allows to filter data for only user content groups for the specified department
1820
+ */
1821
+ departmentId?: number,
1822
+ /**
1823
+ * end date. ISO 8601
1824
+ */
1825
+ endDate?: string,
1826
+ /**
1827
+ * Format
1828
+ *
1829
+ * * `json` - json
1830
+ */
1831
+ format?: 'json',
1832
+ /**
1833
+ * Include main platform data
1834
+ */
1835
+ includeMainPlatform?: boolean,
1836
+ /**
1837
+ * start date. ISO 8601
1838
+ */
1839
+ startDate?: string,
1840
+ }): CancelablePromise<OvertimeWithChangeInfo> {
1841
+ return __request(OpenAPI, {
1842
+ method: 'GET',
1843
+ url: '/api/credentials/orgs/{platform_key}/users/{username}/assertions-over-time/',
1844
+ path: {
1845
+ 'platform_key': platformKey,
1846
+ 'username': username,
1847
+ },
1848
+ query: {
1849
+ 'department_id': departmentId,
1850
+ 'end_date': endDate,
1851
+ 'format': format,
1852
+ 'include_main_platform': includeMainPlatform,
1853
+ 'start_date': startDate,
1854
+ },
1855
+ });
1856
+ }
1857
+ /**
1858
+ * @returns Assertion
1859
+ * @throws ApiError
1860
+ */
1861
+ public static credentialsOrgsUsersAssertionsRetrieve5({
1862
+ entityId,
1863
+ platformKey,
1864
+ username,
1865
+ }: {
1866
+ entityId: string,
1867
+ platformKey: string,
1868
+ username: string,
1869
+ }): CancelablePromise<Assertion> {
1870
+ return __request(OpenAPI, {
1871
+ method: 'GET',
1872
+ url: '/api/credentials/orgs/{platform_key}/users/{username}/assertions/{entity_id}',
1873
+ path: {
1874
+ 'entity_id': entityId,
1875
+ 'platform_key': platformKey,
1876
+ 'username': username,
1877
+ },
1878
+ });
1879
+ }
1880
+ /**
1881
+ * @returns Assertion
1882
+ * @throws ApiError
1883
+ */
1884
+ public static credentialsOrgsUsersAssertionsUpdate2({
1885
+ entityId,
1886
+ platformKey,
1887
+ username,
1888
+ requestBody,
1889
+ }: {
1890
+ entityId: string,
1891
+ platformKey: string,
1892
+ username: string,
1893
+ requestBody: Assertion,
1894
+ }): CancelablePromise<Assertion> {
1895
+ return __request(OpenAPI, {
1896
+ method: 'PUT',
1897
+ url: '/api/credentials/orgs/{platform_key}/users/{username}/assertions/{entity_id}',
1898
+ path: {
1899
+ 'entity_id': entityId,
1900
+ 'platform_key': platformKey,
1901
+ 'username': username,
1902
+ },
1903
+ body: requestBody,
1904
+ mediaType: 'application/json',
1905
+ });
1906
+ }
1907
+ /**
1908
+ * Delete a credential assignment using its entity_id.
1909
+ * Only platform admins and department admins can delete assignments.
1910
+ * @returns void
1911
+ * @throws ApiError
1912
+ */
1913
+ public static credentialsOrgsUsersAssignmentsDestroy2({
1914
+ assignmentId,
1915
+ platformKey,
1916
+ username,
1917
+ }: {
1918
+ assignmentId: string,
1919
+ platformKey: string,
1920
+ username: string,
1921
+ }): CancelablePromise<void> {
1922
+ return __request(OpenAPI, {
1923
+ method: 'DELETE',
1924
+ url: '/api/credentials/orgs/{platform_key}/users/{username}/assignments/{assignment_id}',
1925
+ path: {
1926
+ 'assignment_id': assignmentId,
1927
+ 'platform_key': platformKey,
1928
+ 'username': username,
1929
+ },
1930
+ });
1931
+ }
1932
+ /**
1933
+ * Get group assignments with department-aware filtering
1934
+ * @returns any No response body
1935
+ * @throws ApiError
1936
+ */
1937
+ public static credentialsOrgsUsersAssignmentsGroupsRetrieve2({
1938
+ platformKey,
1939
+ username,
1940
+ }: {
1941
+ platformKey: string,
1942
+ username: string,
1943
+ }): CancelablePromise<any> {
1944
+ return __request(OpenAPI, {
1945
+ method: 'GET',
1946
+ url: '/api/credentials/orgs/{platform_key}/users/{username}/assignments/groups/',
1947
+ path: {
1948
+ 'platform_key': platformKey,
1949
+ 'username': username,
1950
+ },
1951
+ });
1952
+ }
1953
+ /**
1954
+ * Create group assignment with department access validation
1955
+ * @returns any No response body
1956
+ * @throws ApiError
1957
+ */
1958
+ public static credentialsOrgsUsersAssignmentsGroupsCreate2({
1959
+ platformKey,
1960
+ username,
1961
+ }: {
1962
+ platformKey: string,
1963
+ username: string,
1964
+ }): CancelablePromise<any> {
1965
+ return __request(OpenAPI, {
1966
+ method: 'POST',
1967
+ url: '/api/credentials/orgs/{platform_key}/users/{username}/assignments/groups/',
1968
+ path: {
1969
+ 'platform_key': platformKey,
1970
+ 'username': username,
1971
+ },
1972
+ });
1973
+ }
1974
+ /**
1975
+ * Get assignments and their corresponding assertions based on user role:
1976
+ * - Regular users: get only their own assignments
1977
+ * - Platform admins: get assignments for all users in their platform
1978
+ * - Department admins: get assignments for users in their department groups
1979
+ * @returns any No response body
1980
+ * @throws ApiError
1981
+ */
1982
+ public static credentialsOrgsUsersAssignmentsUsersRetrieve2({
1983
+ platformKey,
1984
+ username,
1985
+ }: {
1986
+ platformKey: string,
1987
+ username: string,
1988
+ }): CancelablePromise<any> {
1989
+ return __request(OpenAPI, {
1990
+ method: 'GET',
1991
+ url: '/api/credentials/orgs/{platform_key}/users/{username}/assignments/users/',
1992
+ path: {
1993
+ 'platform_key': platformKey,
1994
+ 'username': username,
1995
+ },
1996
+ });
1997
+ }
1998
+ /**
1999
+ * Create assignments with department access validation
2000
+ * @returns any No response body
2001
+ * @throws ApiError
2002
+ */
2003
+ public static credentialsOrgsUsersAssignmentsUsersCreate2({
2004
+ platformKey,
2005
+ username,
2006
+ }: {
2007
+ platformKey: string,
2008
+ username: string,
2009
+ }): CancelablePromise<any> {
2010
+ return __request(OpenAPI, {
2011
+ method: 'POST',
2012
+ url: '/api/credentials/orgs/{platform_key}/users/{username}/assignments/users/',
2013
+ path: {
2014
+ 'platform_key': platformKey,
2015
+ 'username': username,
2016
+ },
2017
+ });
2018
+ }
2019
+ /**
2020
+ * Get all credentials of a given tenant
2021
+ * @returns OverTime
2022
+ * @throws ApiError
2023
+ */
2024
+ public static credentialsOrgsUsersCourseAssertionsOverTimeRetrieve2({
2025
+ platformKey,
2026
+ username,
2027
+ departmentId,
2028
+ endDate,
2029
+ format = 'json',
2030
+ includeMainPlatform = true,
2031
+ startDate,
2032
+ }: {
2033
+ platformKey: string,
2034
+ username: string,
2035
+ /**
2036
+ * When `department_mode=1` is passed, it allows to filter data for only user content groups for the specified department
2037
+ */
2038
+ departmentId?: number,
2039
+ /**
2040
+ * end date. ISO 8601
2041
+ */
2042
+ endDate?: string,
2043
+ /**
2044
+ * Format
2045
+ *
2046
+ * * `json` - json
2047
+ */
2048
+ format?: 'json',
2049
+ /**
2050
+ * Include main platform data
2051
+ */
2052
+ includeMainPlatform?: boolean,
2053
+ /**
2054
+ * start date. ISO 8601
2055
+ */
2056
+ startDate?: string,
2057
+ }): CancelablePromise<OverTime> {
2058
+ return __request(OpenAPI, {
2059
+ method: 'GET',
2060
+ url: '/api/credentials/orgs/{platform_key}/users/{username}/course-assertions-over-time/',
2061
+ path: {
2062
+ 'platform_key': platformKey,
2063
+ 'username': username,
2064
+ },
2065
+ query: {
2066
+ 'department_id': departmentId,
2067
+ 'end_date': endDate,
2068
+ 'format': format,
2069
+ 'include_main_platform': includeMainPlatform,
2070
+ 'start_date': startDate,
2071
+ },
2072
+ });
2073
+ }
2074
+ /**
2075
+ * @returns any No response body
2076
+ * @throws ApiError
2077
+ */
2078
+ public static credentialsOrgsUsersCourseCredentialsList2({
2079
+ platformKey,
2080
+ username,
2081
+ page,
2082
+ pageSize,
2083
+ }: {
2084
+ platformKey: string,
2085
+ username: string,
2086
+ /**
2087
+ * A page number within the paginated result set.
2088
+ */
2089
+ page?: number,
2090
+ /**
2091
+ * Number of results to return per page.
2092
+ */
2093
+ pageSize?: number,
2094
+ }): CancelablePromise<any> {
2095
+ return __request(OpenAPI, {
2096
+ method: 'GET',
2097
+ url: '/api/credentials/orgs/{platform_key}/users/{username}/course-credentials/',
2098
+ path: {
2099
+ 'platform_key': platformKey,
2100
+ 'username': username,
2101
+ },
2102
+ query: {
2103
+ 'page': page,
2104
+ 'page_size': pageSize,
2105
+ },
2106
+ });
2107
+ }
2108
+ /**
2109
+ * Get all credentials of a given tenant
2110
+ * @returns OverTime
2111
+ * @throws ApiError
2112
+ */
2113
+ public static credentialsOrgsUsersCredentialsOverTimeRetrieve2({
2114
+ platformKey,
2115
+ username,
2116
+ departmentId,
2117
+ endDate,
2118
+ format = 'json',
2119
+ includeMainPlatform = true,
2120
+ startDate,
2121
+ }: {
2122
+ platformKey: string,
2123
+ username: string,
2124
+ /**
2125
+ * When `department_mode=1` is passed, it allows to filter data for only user content groups for the specified department
2126
+ */
2127
+ departmentId?: number,
2128
+ /**
2129
+ * end date. ISO 8601
2130
+ */
2131
+ endDate?: string,
2132
+ /**
2133
+ * Format
2134
+ *
2135
+ * * `json` - json
2136
+ */
2137
+ format?: 'json',
2138
+ /**
2139
+ * Include main platform data
2140
+ */
2141
+ includeMainPlatform?: boolean,
2142
+ /**
2143
+ * start date. ISO 8601
2144
+ */
2145
+ startDate?: string,
2146
+ }): CancelablePromise<OverTime> {
2147
+ return __request(OpenAPI, {
2148
+ method: 'GET',
2149
+ url: '/api/credentials/orgs/{platform_key}/users/{username}/credentials-over-time/',
2150
+ path: {
2151
+ 'platform_key': platformKey,
2152
+ 'username': username,
2153
+ },
2154
+ query: {
2155
+ 'department_id': departmentId,
2156
+ 'end_date': endDate,
2157
+ 'format': format,
2158
+ 'include_main_platform': includeMainPlatform,
2159
+ 'start_date': startDate,
2160
+ },
2161
+ });
2162
+ }
2163
+ /**
2164
+ * Retrieve external credential mappings for the platform.
2165
+ *
2166
+ * Query Parameters:
2167
+ * credential_id (str, optional): Filter by credential entity_id
2168
+ * provider_name (str, optional): Filter by provider name
2169
+ * page (int, optional): Page number
2170
+ * page_size (int, optional): Items per page
2171
+ *
2172
+ * Returns all mappings for the platform if the user is an admin.
2173
+ * @returns ExternalCredentialMapping
2174
+ * @throws ApiError
2175
+ */
2176
+ public static credentialsOrgsUsersExternalMappingRetrieve2({
2177
+ platformKey,
2178
+ username,
2179
+ }: {
2180
+ platformKey: string,
2181
+ username: string,
2182
+ }): CancelablePromise<ExternalCredentialMapping> {
2183
+ return __request(OpenAPI, {
2184
+ method: 'GET',
2185
+ url: '/api/credentials/orgs/{platform_key}/users/{username}/external-mapping/',
2186
+ path: {
2187
+ 'platform_key': platformKey,
2188
+ 'username': username,
2189
+ },
2190
+ });
2191
+ }
2192
+ /**
2193
+ * Create or update an external credential mapping.
2194
+ *
2195
+ * If a mapping doesn't exist for the credential + platform + provider combination,
2196
+ * it will be created. If it exists, it will be updated.
2197
+ *
2198
+ * Request Body:
1549
2199
  * {
1550
- * "name": "Example University",
1551
- * "org": "example-university",
1552
- * "entityId": "abc123",
1553
- * "signatories": [...],
1554
- * "url": "https://example.com",
1555
- * "iconImage": "https://example.com/logo.png",
1556
- * "allowed_template_tags": [...]
2200
+ * "credential_id": "credential-entity-id", // Required
2201
+ * "provider_name": "accredible", // Required
2202
+ * "external_template_id": "123456", // Optional
2203
+ * "metadata": {} // Optional
1557
2204
  * }
1558
- * ]
1559
2205
  *
1560
- * PUT: A JSON response containing the updated issuer details:
1561
- * [
2206
+ * Returns:
2207
+ * - 201 Created: When creating a new mapping
2208
+ * - 200 OK: When updating an existing mapping
2209
+ * @returns ExternalCredentialMapping
2210
+ * @throws ApiError
2211
+ */
2212
+ public static credentialsOrgsUsersExternalMappingCreate2({
2213
+ platformKey,
2214
+ username,
2215
+ requestBody,
2216
+ }: {
2217
+ platformKey: string,
2218
+ username: string,
2219
+ requestBody: ExternalCredentialMapping,
2220
+ }): CancelablePromise<ExternalCredentialMapping> {
2221
+ return __request(OpenAPI, {
2222
+ method: 'POST',
2223
+ url: '/api/credentials/orgs/{platform_key}/users/{username}/external-mapping/',
2224
+ path: {
2225
+ 'platform_key': platformKey,
2226
+ 'username': username,
2227
+ },
2228
+ body: requestBody,
2229
+ mediaType: 'application/json',
2230
+ });
2231
+ }
2232
+ /**
2233
+ * Delete an external credential mapping.
2234
+ *
2235
+ * Request Body:
2236
+ * {
2237
+ * "credential_id": "credential-entity-id", // Required
2238
+ * "provider_name": "accredible" // Required
2239
+ * }
2240
+ *
2241
+ * Returns:
2242
+ * A JSON response confirming deletion
2243
+ * @returns void
2244
+ * @throws ApiError
2245
+ */
2246
+ public static credentialsOrgsUsersExternalMappingDestroy2({
2247
+ platformKey,
2248
+ username,
2249
+ }: {
2250
+ platformKey: string,
2251
+ username: string,
2252
+ }): CancelablePromise<void> {
2253
+ return __request(OpenAPI, {
2254
+ method: 'DELETE',
2255
+ url: '/api/credentials/orgs/{platform_key}/users/{username}/external-mapping/',
2256
+ path: {
2257
+ 'platform_key': platformKey,
2258
+ 'username': username,
2259
+ },
2260
+ });
2261
+ }
2262
+ /**
2263
+ * @returns UploadedImage
2264
+ * @throws ApiError
2265
+ */
2266
+ public static credentialsOrgsUsersImagesRetrieve2({
2267
+ platformKey,
2268
+ username,
2269
+ }: {
2270
+ platformKey: string,
2271
+ username: string,
2272
+ }): CancelablePromise<UploadedImage> {
2273
+ return __request(OpenAPI, {
2274
+ method: 'GET',
2275
+ url: '/api/credentials/orgs/{platform_key}/users/{username}/images/',
2276
+ path: {
2277
+ 'platform_key': platformKey,
2278
+ 'username': username,
2279
+ },
2280
+ });
2281
+ }
2282
+ /**
2283
+ * @returns UploadedImage
2284
+ * @throws ApiError
2285
+ */
2286
+ public static credentialsOrgsUsersImagesCreate2({
2287
+ platformKey,
2288
+ username,
2289
+ requestBody,
2290
+ }: {
2291
+ platformKey: string,
2292
+ username: string,
2293
+ requestBody?: UploadedImage,
2294
+ }): CancelablePromise<UploadedImage> {
2295
+ return __request(OpenAPI, {
2296
+ method: 'POST',
2297
+ url: '/api/credentials/orgs/{platform_key}/users/{username}/images/',
2298
+ path: {
2299
+ 'platform_key': platformKey,
2300
+ 'username': username,
2301
+ },
2302
+ body: requestBody,
2303
+ mediaType: 'application/json',
2304
+ });
2305
+ }
2306
+ /**
2307
+ * A GET View that validates QueryParams and returns results to a serializer
2308
+ * @returns Issuer
2309
+ * @throws ApiError
2310
+ */
2311
+ public static credentialsOrgsUsersIssuersRetrieve3({
2312
+ platformKey,
2313
+ q,
2314
+ username,
2315
+ }: {
2316
+ platformKey: string,
2317
+ q: string,
2318
+ username: string,
2319
+ }): CancelablePromise<Issuer> {
2320
+ return __request(OpenAPI, {
2321
+ method: 'GET',
2322
+ url: '/api/credentials/orgs/{platform_key}/users/{username}/issuers/',
2323
+ path: {
2324
+ 'platform_key': platformKey,
2325
+ 'username': username,
2326
+ },
2327
+ query: {
2328
+ 'q': q,
2329
+ },
2330
+ });
2331
+ }
2332
+ /**
2333
+ * A GET View that validates QueryParams and returns results to a serializer
2334
+ * @returns Issuer
2335
+ * @throws ApiError
2336
+ */
2337
+ public static credentialsOrgsUsersIssuersCreate2({
2338
+ platformKey,
2339
+ q,
2340
+ username,
2341
+ requestBody,
2342
+ }: {
2343
+ platformKey: string,
2344
+ q: string,
2345
+ username: string,
2346
+ requestBody: Issuer,
2347
+ }): CancelablePromise<Issuer> {
2348
+ return __request(OpenAPI, {
2349
+ method: 'POST',
2350
+ url: '/api/credentials/orgs/{platform_key}/users/{username}/issuers/',
2351
+ path: {
2352
+ 'platform_key': platformKey,
2353
+ 'username': username,
2354
+ },
2355
+ query: {
2356
+ 'q': q,
2357
+ },
2358
+ body: requestBody,
2359
+ mediaType: 'application/json',
2360
+ });
2361
+ }
2362
+ /**
2363
+ * @returns Issuer
2364
+ * @throws ApiError
2365
+ */
2366
+ public static credentialsOrgsUsersIssuersRetrieve4({
2367
+ entityId,
2368
+ platformKey,
2369
+ username,
2370
+ }: {
2371
+ entityId: string,
2372
+ platformKey: string,
2373
+ username: string,
2374
+ }): CancelablePromise<Issuer> {
2375
+ return __request(OpenAPI, {
2376
+ method: 'GET',
2377
+ url: '/api/credentials/orgs/{platform_key}/users/{username}/issuers/{entity_id}',
2378
+ path: {
2379
+ 'entity_id': entityId,
2380
+ 'platform_key': platformKey,
2381
+ 'username': username,
2382
+ },
2383
+ });
2384
+ }
2385
+ /**
2386
+ * @returns Issuer
2387
+ * @throws ApiError
2388
+ */
2389
+ public static credentialsOrgsUsersIssuersUpdate2({
2390
+ entityId,
2391
+ platformKey,
2392
+ username,
2393
+ requestBody,
2394
+ }: {
2395
+ entityId: string,
2396
+ platformKey: string,
2397
+ username: string,
2398
+ requestBody: Issuer,
2399
+ }): CancelablePromise<Issuer> {
2400
+ return __request(OpenAPI, {
2401
+ method: 'PUT',
2402
+ url: '/api/credentials/orgs/{platform_key}/users/{username}/issuers/{entity_id}',
2403
+ path: {
2404
+ 'entity_id': entityId,
2405
+ 'platform_key': platformKey,
2406
+ 'username': username,
2407
+ },
2408
+ body: requestBody,
2409
+ mediaType: 'application/json',
2410
+ });
2411
+ }
2412
+ /**
2413
+ * @returns void
2414
+ * @throws ApiError
2415
+ */
2416
+ public static credentialsOrgsUsersIssuersDestroy2({
2417
+ entityId,
2418
+ platformKey,
2419
+ username,
2420
+ }: {
2421
+ entityId: string,
2422
+ platformKey: string,
2423
+ username: string,
2424
+ }): CancelablePromise<void> {
2425
+ return __request(OpenAPI, {
2426
+ method: 'DELETE',
2427
+ url: '/api/credentials/orgs/{platform_key}/users/{username}/issuers/{entity_id}',
2428
+ path: {
2429
+ 'entity_id': entityId,
2430
+ 'platform_key': platformKey,
2431
+ 'username': username,
2432
+ },
2433
+ });
2434
+ }
2435
+ /**
2436
+ * @returns IssuerAuthority
2437
+ * @throws ApiError
2438
+ */
2439
+ public static credentialsOrgsUsersIssuersAuthorityCreate2({
2440
+ platformKey,
2441
+ username,
2442
+ requestBody,
2443
+ }: {
2444
+ platformKey: string,
2445
+ username: string,
2446
+ requestBody: IssuerAuthority,
2447
+ }): CancelablePromise<IssuerAuthority> {
2448
+ return __request(OpenAPI, {
2449
+ method: 'POST',
2450
+ url: '/api/credentials/orgs/{platform_key}/users/{username}/issuers/authority/',
2451
+ path: {
2452
+ 'platform_key': platformKey,
2453
+ 'username': username,
2454
+ },
2455
+ body: requestBody,
2456
+ mediaType: 'application/json',
2457
+ });
2458
+ }
2459
+ /**
2460
+ * Retrieve provider configurations for the platform.
2461
+ *
2462
+ * Query Parameters:
2463
+ * provider_name (str, optional): Filter to a specific provider
2464
+ * page (int, optional): Page number
2465
+ * page_size (int, optional): Items per page
2466
+ *
2467
+ * Returns all configurations for the platform if the user is an admin.
2468
+ * @returns CredentialProviderConfig
2469
+ * @throws ApiError
2470
+ */
2471
+ public static credentialsOrgsUsersProviderConfigRetrieve2({
2472
+ platformKey,
2473
+ username,
2474
+ }: {
2475
+ platformKey: string,
2476
+ username: string,
2477
+ }): CancelablePromise<CredentialProviderConfig> {
2478
+ return __request(OpenAPI, {
2479
+ method: 'GET',
2480
+ url: '/api/credentials/orgs/{platform_key}/users/{username}/provider-config/',
2481
+ path: {
2482
+ 'platform_key': platformKey,
2483
+ 'username': username,
2484
+ },
2485
+ });
2486
+ }
2487
+ /**
2488
+ * Create or update a provider configuration.
2489
+ *
2490
+ * If a configuration doesn't exist for the platform and provider, it will be created.
2491
+ * If it exists, it will be updated.
2492
+ *
2493
+ * Request Body:
1562
2494
  * {
1563
- * "name": "Example University",
1564
- * "org": "example-university",
1565
- * "entityId": "abc123",
1566
- * "signatories": [...],
1567
- * "url": "https://example.com",
1568
- * "iconImage": "https://example.com/new-logo.png",
1569
- * "allowed_template_tags": [...]
2495
+ * "provider_name": "accredible", // Required
2496
+ * "config": {...}, // Optional
2497
+ * "enabled": true // Optional
1570
2498
  * }
1571
- * ]
1572
2499
  *
1573
- * DELETE: A JSON response indicating success:
2500
+ * Returns:
2501
+ * - 201 Created: When creating a new configuration
2502
+ * - 200 OK: When updating an existing configuration
2503
+ * @returns CredentialProviderConfig
2504
+ * @throws ApiError
2505
+ */
2506
+ public static credentialsOrgsUsersProviderConfigCreate2({
2507
+ platformKey,
2508
+ username,
2509
+ requestBody,
2510
+ }: {
2511
+ platformKey: string,
2512
+ username: string,
2513
+ requestBody: CredentialProviderConfig,
2514
+ }): CancelablePromise<CredentialProviderConfig> {
2515
+ return __request(OpenAPI, {
2516
+ method: 'POST',
2517
+ url: '/api/credentials/orgs/{platform_key}/users/{username}/provider-config/',
2518
+ path: {
2519
+ 'platform_key': platformKey,
2520
+ 'username': username,
2521
+ },
2522
+ body: requestBody,
2523
+ mediaType: 'application/json',
2524
+ });
2525
+ }
2526
+ /**
2527
+ * Deactivate a provider configuration (sets enabled=False).
2528
+ *
2529
+ * Request Body:
1574
2530
  * {
1575
- * "status": {"success": true, "description": "Deleted"}
2531
+ * "provider_name": "accredible" // Required
1576
2532
  * }
1577
- *
1578
- * Error Responses:
1579
- * 400 Bad Request: If the request data is invalid
1580
- * 401 Unauthorized: If the user is not authenticated
1581
- * 403 Forbidden: If the user does not have permission to access this resource
1582
- * 404 Not Found: If the issuer doesn't exist
1583
- * 500 Internal Server Error: If an unexpected error occurs
1584
- *
1585
- * Access Control:
1586
- * - Requires IsAdminUserOrStudentDRFMixin
1587
- * - Only authenticated users with appropriate permissions can manage issuers
1588
- * @returns Issuer
2533
+ * @returns void
1589
2534
  * @throws ApiError
1590
2535
  */
1591
- public static credentialsOrgsUsersIssuersRetrieve2({
1592
- entityId,
2536
+ public static credentialsOrgsUsersProviderConfigDestroy2({
1593
2537
  platformKey,
1594
2538
  username,
1595
2539
  }: {
1596
- entityId: string,
1597
2540
  platformKey: string,
1598
2541
  username: string,
1599
- }): CancelablePromise<Issuer> {
2542
+ }): CancelablePromise<void> {
1600
2543
  return __request(OpenAPI, {
1601
- method: 'GET',
1602
- url: '/api/credentials/orgs/{platform_key}/users/{username}/issuers/{entity_id}',
2544
+ method: 'DELETE',
2545
+ url: '/api/credentials/orgs/{platform_key}/users/{username}/provider-config/',
1603
2546
  path: {
1604
- 'entity_id': entityId,
1605
2547
  'platform_key': platformKey,
1606
2548
  'username': username,
1607
2549
  },
1608
2550
  });
1609
2551
  }
1610
2552
  /**
1611
- * API View for managing individual issuers.
2553
+ * Get list of enabled credential providers with pagination.
2554
+ * @returns any No response body
2555
+ * @throws ApiError
2556
+ */
2557
+ public static credentialsProvidersRetrieve(): CancelablePromise<any> {
2558
+ return __request(OpenAPI, {
2559
+ method: 'GET',
2560
+ url: '/api/credentials/providers/',
2561
+ });
2562
+ }
2563
+ /**
2564
+ * Public endpoint to retrieve a specific credential assertion by its entity ID.
1612
2565
  *
1613
- * This endpoint allows retrieving, updating, and deleting specific issuers
1614
- * identified by their entity_id or org identifier.
2566
+ * This endpoint allows public access to view a specific credential assertion
2567
+ * without authentication.
1615
2568
  *
1616
2569
  * Path Parameters:
1617
- * org (str): The organization/tenant identifier
1618
- * user_id (str): The user ID making the request
1619
- * entity_id (str): The issuer entity ID or org identifier
1620
- *
1621
- * Methods:
1622
- * GET: Retrieve a specific issuer
1623
- * PUT: Update a specific issuer
1624
- * DELETE: Delete a specific issuer
1625
- *
1626
- * PUT Request Body:
1627
- * A JSON object containing issuer details to update:
1628
- * - name (str, optional): Issuer name
1629
- * - iconImage (str, optional): URL to issuer icon
1630
- * - email (str, optional): Contact email for the issuer
1631
- * - url (str, optional): Website URL for the issuer
1632
- * - allowed_template_tags (array, optional): List of allowed template tags
2570
+ * entity_id (str): The assertion entity ID
1633
2571
  *
1634
2572
  * Returns:
1635
- * GET: A JSON response containing the issuer details:
1636
- * [
1637
- * {
1638
- * "name": "Example University",
1639
- * "org": "example-university",
1640
- * "entityId": "abc123",
1641
- * "signatories": [...],
1642
- * "url": "https://example.com",
1643
- * "iconImage": "https://example.com/logo.png",
1644
- * "allowed_template_tags": [...]
1645
- * }
1646
- * ]
1647
- *
1648
- * PUT: A JSON response containing the updated issuer details:
1649
- * [
1650
- * {
1651
- * "name": "Example University",
1652
- * "org": "example-university",
1653
- * "entityId": "abc123",
1654
- * "signatories": [...],
1655
- * "url": "https://example.com",
1656
- * "iconImage": "https://example.com/new-logo.png",
1657
- * "allowed_template_tags": [...]
1658
- * }
1659
- * ]
1660
- *
1661
- * DELETE: A JSON response indicating success:
1662
- * {
1663
- * "status": {"success": true, "description": "Deleted"}
1664
- * }
1665
- *
1666
- * Error Responses:
1667
- * 400 Bad Request: If the request data is invalid
1668
- * 401 Unauthorized: If the user is not authenticated
1669
- * 403 Forbidden: If the user does not have permission to access this resource
1670
- * 404 Not Found: If the issuer doesn't exist
1671
- * 500 Internal Server Error: If an unexpected error occurs
1672
- *
1673
- * Access Control:
1674
- * - Requires IsAdminUserOrStudentDRFMixin
1675
- * - Only authenticated users with appropriate permissions can manage issuers
1676
- * @returns Issuer
1677
- * @throws ApiError
1678
- */
1679
- public static credentialsOrgsUsersIssuersUpdate({
1680
- entityId,
1681
- platformKey,
1682
- username,
1683
- requestBody,
1684
- }: {
1685
- entityId: string,
1686
- platformKey: string,
1687
- username: string,
1688
- requestBody: Issuer,
1689
- }): CancelablePromise<Issuer> {
1690
- return __request(OpenAPI, {
1691
- method: 'PUT',
1692
- url: '/api/credentials/orgs/{platform_key}/users/{username}/issuers/{entity_id}',
1693
- path: {
1694
- 'entity_id': entityId,
1695
- 'platform_key': platformKey,
1696
- 'username': username,
1697
- },
1698
- body: requestBody,
1699
- mediaType: 'application/json',
1700
- });
1701
- }
1702
- /**
1703
- * API View for managing individual issuers.
1704
- *
1705
- * This endpoint allows retrieving, updating, and deleting specific issuers
1706
- * identified by their entity_id or org identifier.
1707
- *
1708
- * Path Parameters:
1709
- * org (str): The organization/tenant identifier
1710
- * user_id (str): The user ID making the request
1711
- * entity_id (str): The issuer entity ID or org identifier
1712
- *
1713
- * Methods:
1714
- * GET: Retrieve a specific issuer
1715
- * PUT: Update a specific issuer
1716
- * DELETE: Delete a specific issuer
1717
- *
1718
- * PUT Request Body:
1719
- * A JSON object containing issuer details to update:
1720
- * - name (str, optional): Issuer name
1721
- * - iconImage (str, optional): URL to issuer icon
1722
- * - email (str, optional): Contact email for the issuer
1723
- * - url (str, optional): Website URL for the issuer
1724
- * - allowed_template_tags (array, optional): List of allowed template tags
1725
- *
1726
- * Returns:
1727
- * GET: A JSON response containing the issuer details:
1728
- * [
1729
- * {
1730
- * "name": "Example University",
1731
- * "org": "example-university",
1732
- * "entityId": "abc123",
1733
- * "signatories": [...],
1734
- * "url": "https://example.com",
1735
- * "iconImage": "https://example.com/logo.png",
1736
- * "allowed_template_tags": [...]
1737
- * }
1738
- * ]
1739
- *
1740
- * PUT: A JSON response containing the updated issuer details:
1741
- * [
1742
- * {
1743
- * "name": "Example University",
1744
- * "org": "example-university",
1745
- * "entityId": "abc123",
1746
- * "signatories": [...],
1747
- * "url": "https://example.com",
1748
- * "iconImage": "https://example.com/new-logo.png",
1749
- * "allowed_template_tags": [...]
1750
- * }
1751
- * ]
1752
- *
1753
- * DELETE: A JSON response indicating success:
1754
- * {
1755
- * "status": {"success": true, "description": "Deleted"}
1756
- * }
1757
- *
1758
- * Error Responses:
1759
- * 400 Bad Request: If the request data is invalid
1760
- * 401 Unauthorized: If the user is not authenticated
1761
- * 403 Forbidden: If the user does not have permission to access this resource
1762
- * 404 Not Found: If the issuer doesn't exist
1763
- * 500 Internal Server Error: If an unexpected error occurs
1764
- *
1765
- * Access Control:
1766
- * - Requires IsAdminUserOrStudentDRFMixin
1767
- * - Only authenticated users with appropriate permissions can manage issuers
1768
- * @returns void
1769
- * @throws ApiError
1770
- */
1771
- public static credentialsOrgsUsersIssuersDestroy({
1772
- entityId,
1773
- platformKey,
1774
- username,
1775
- }: {
1776
- entityId: string,
1777
- platformKey: string,
1778
- username: string,
1779
- }): CancelablePromise<void> {
1780
- return __request(OpenAPI, {
1781
- method: 'DELETE',
1782
- url: '/api/credentials/orgs/{platform_key}/users/{username}/issuers/{entity_id}',
1783
- path: {
1784
- 'entity_id': entityId,
1785
- 'platform_key': platformKey,
1786
- 'username': username,
1787
- },
1788
- });
1789
- }
1790
- /**
1791
- * API View for managing issuer authorities (signatories).
1792
- *
1793
- * This endpoint allows creating authorities/signatories that can be associated
1794
- * with issuers or specific credentials.
1795
- *
1796
- * Path Parameters:
1797
- * org (str): The organization/tenant identifier
1798
- * user_id (str): The user ID making the request
1799
- *
1800
- * Methods:
1801
- * POST: Create a new issuer authority
1802
- *
1803
- * POST Request Body:
1804
- * A JSON object containing authority details:
1805
- * - name (str, required): Name of the signatory
1806
- * - title (str, required): Title of the signatory
1807
- * - signature (str, required): URL to the signature image
1808
- * - org (str, optional): Organization identifier to associate with an issuer
1809
- * - entityId (str, optional): Issuer entity ID to associate with
1810
- * - credential (str, optional): Credential entity ID to associate with
1811
- *
1812
- * Returns:
1813
- * POST: A JSON response containing the created authority:
1814
- * {
1815
- * "data": {
1816
- * "name": "John Smith",
1817
- * "title": "President",
1818
- * "signature": "https://example.com/signatures/john-smith.png"
1819
- * }
1820
- * }
1821
- *
1822
- * Error Responses:
1823
- * 400 Bad Request: If the request data is invalid or missing required fields
1824
- * 401 Unauthorized: If the user is not authenticated
1825
- * 403 Forbidden: If the user does not have permission to access this resource
1826
- * 404 Not Found: If the issuer or credential doesn't exist
1827
- * 500 Internal Server Error: If an unexpected error occurs
1828
- *
1829
- * Access Control:
1830
- * - Requires IsAdminUserOrStudentDRFMixin
1831
- * - Only authenticated users with appropriate permissions can manage authorities
1832
- * @returns IssuerAuthority
1833
- * @throws ApiError
1834
- */
1835
- public static credentialsOrgsUsersIssuersAuthorityCreate({
1836
- platformKey,
1837
- username,
1838
- requestBody,
1839
- }: {
1840
- platformKey: string,
1841
- username: string,
1842
- requestBody: IssuerAuthority,
1843
- }): CancelablePromise<IssuerAuthority> {
1844
- return __request(OpenAPI, {
1845
- method: 'POST',
1846
- url: '/api/credentials/orgs/{platform_key}/users/{username}/issuers/authority/',
1847
- path: {
1848
- 'platform_key': platformKey,
1849
- 'username': username,
1850
- },
1851
- body: requestBody,
1852
- mediaType: 'application/json',
1853
- });
1854
- }
1855
- /**
1856
- * Retrieve provider configurations for the platform.
1857
- *
1858
- * Query Parameters:
1859
- * provider_name (str, optional): Filter to a specific provider
1860
- * page (int, optional): Page number
1861
- * page_size (int, optional): Items per page
1862
- *
1863
- * Returns all configurations for the platform if the user is an admin.
1864
- * @returns CredentialProviderConfig
1865
- * @throws ApiError
1866
- */
1867
- public static credentialsOrgsUsersProviderConfigRetrieve({
1868
- platformKey,
1869
- username,
1870
- }: {
1871
- platformKey: string,
1872
- username: string,
1873
- }): CancelablePromise<CredentialProviderConfig> {
1874
- return __request(OpenAPI, {
1875
- method: 'GET',
1876
- url: '/api/credentials/orgs/{platform_key}/users/{username}/provider-config/',
1877
- path: {
1878
- 'platform_key': platformKey,
1879
- 'username': username,
1880
- },
1881
- });
1882
- }
1883
- /**
1884
- * Create or update a provider configuration.
1885
- *
1886
- * If a configuration doesn't exist for the platform and provider, it will be created.
1887
- * If it exists, it will be updated.
1888
- *
1889
- * Request Body:
1890
- * {
1891
- * "provider_name": "accredible", // Required
1892
- * "config": {...}, // Optional
1893
- * "enabled": true // Optional
1894
- * }
1895
- *
1896
- * Returns:
1897
- * - 201 Created: When creating a new configuration
1898
- * - 200 OK: When updating an existing configuration
1899
- * @returns CredentialProviderConfig
1900
- * @throws ApiError
1901
- */
1902
- public static credentialsOrgsUsersProviderConfigCreate({
1903
- platformKey,
1904
- username,
1905
- requestBody,
1906
- }: {
1907
- platformKey: string,
1908
- username: string,
1909
- requestBody: CredentialProviderConfig,
1910
- }): CancelablePromise<CredentialProviderConfig> {
1911
- return __request(OpenAPI, {
1912
- method: 'POST',
1913
- url: '/api/credentials/orgs/{platform_key}/users/{username}/provider-config/',
1914
- path: {
1915
- 'platform_key': platformKey,
1916
- 'username': username,
1917
- },
1918
- body: requestBody,
1919
- mediaType: 'application/json',
1920
- });
1921
- }
1922
- /**
1923
- * Deactivate a provider configuration (sets enabled=False).
1924
- *
1925
- * Request Body:
1926
- * {
1927
- * "provider_name": "accredible" // Required
1928
- * }
1929
- * @returns void
1930
- * @throws ApiError
1931
- */
1932
- public static credentialsOrgsUsersProviderConfigDestroy({
1933
- platformKey,
1934
- username,
1935
- }: {
1936
- platformKey: string,
1937
- username: string,
1938
- }): CancelablePromise<void> {
1939
- return __request(OpenAPI, {
1940
- method: 'DELETE',
1941
- url: '/api/credentials/orgs/{platform_key}/users/{username}/provider-config/',
1942
- path: {
1943
- 'platform_key': platformKey,
1944
- 'username': username,
1945
- },
1946
- });
1947
- }
1948
- /**
1949
- * Get list of enabled credential providers with pagination.
1950
- * @returns any No response body
1951
- * @throws ApiError
1952
- */
1953
- public static credentialsProvidersRetrieve(): CancelablePromise<any> {
1954
- return __request(OpenAPI, {
1955
- method: 'GET',
1956
- url: '/api/credentials/providers/',
1957
- });
1958
- }
1959
- /**
1960
- * Public endpoint to retrieve a specific credential assertion by its entity ID.
1961
- *
1962
- * This endpoint allows public access to view a specific credential assertion
1963
- * without authentication.
1964
- *
1965
- * Path Parameters:
1966
- * entity_id (str): The assertion entity ID
1967
- *
1968
- * Returns:
1969
- * A JSON response containing the assertion details using the AssertionSerializer format
1970
- *
1971
- * Error Responses:
1972
- * 404 Not Found:
1973
- * - If the assertion doesn't exist: Empty response with 404 status
1974
- * - If the assertion has been revoked: JSON with error detail and revocation reason
1975
- * 500 Internal Server Error: If an unexpected error occurs
1976
- * @returns Assertion
1977
- * @throws ApiError
1978
- */
1979
- public static credentialsPublicAssertionsRetrieve({
1980
- entityId,
1981
- }: {
1982
- entityId: string,
1983
- }): CancelablePromise<Assertion> {
1984
- return __request(OpenAPI, {
1985
- method: 'GET',
1986
- url: '/api/credentials/public/assertions/{entity_id}/',
1987
- path: {
1988
- 'entity_id': entityId,
1989
- },
1990
- });
1991
- }
1992
- }
2573
+ * A JSON response containing the assertion details using the AssertionSerializer format
2574
+ *
2575
+ * Error Responses:
2576
+ * 404 Not Found:
2577
+ * - If the assertion doesn't exist: Empty response with 404 status
2578
+ * - If the assertion has been revoked: JSON with error detail and revocation reason
2579
+ * 500 Internal Server Error: If an unexpected error occurs
2580
+ * @returns Assertion
2581
+ * @throws ApiError
2582
+ */
2583
+ public static credentialsPublicAssertionsRetrieve({
2584
+ entityId,
2585
+ }: {
2586
+ entityId: string,
2587
+ }): CancelablePromise<Assertion> {
2588
+ return __request(OpenAPI, {
2589
+ method: 'GET',
2590
+ url: '/api/credentials/public/assertions/{entity_id}/',
2591
+ path: {
2592
+ 'entity_id': entityId,
2593
+ },
2594
+ });
2595
+ }
2596
+ }