@iblai/iblai-api 4.243.2-core → 4.245.0-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.
Files changed (33) hide show
  1. package/dist/index.cjs.js +293 -1
  2. package/dist/index.cjs.js.map +1 -1
  3. package/dist/index.esm.js +294 -2
  4. package/dist/index.esm.js.map +1 -1
  5. package/dist/index.umd.js +293 -1
  6. package/dist/index.umd.js.map +1 -1
  7. package/dist/types/index.d.ts +10 -0
  8. package/dist/types/models/DemographicsFieldDefinition.d.ts +45 -0
  9. package/dist/types/models/DemographicsFieldDefinitionWrite.d.ts +42 -0
  10. package/dist/types/models/DisabilityStatusEnum.d.ts +10 -0
  11. package/dist/types/models/EthnicityEnum.d.ts +22 -0
  12. package/dist/types/models/FieldDefinitionImport.d.ts +4 -0
  13. package/dist/types/models/FieldTypeEnum.d.ts +16 -0
  14. package/dist/types/models/GenderEnum.d.ts +14 -0
  15. package/dist/types/models/PatchedDemographicsFieldDefinitionWrite.d.ts +42 -0
  16. package/dist/types/models/UserDemographicsResponse.d.ts +58 -0
  17. package/dist/types/models/UserDemographicsWrite.d.ts +58 -0
  18. package/dist/types/services/CoreService.d.ts +107 -0
  19. package/package.json +1 -1
  20. package/sdk_schema.yml +708 -1
  21. package/src/core/OpenAPI.ts +1 -1
  22. package/src/index.ts +10 -0
  23. package/src/models/DemographicsFieldDefinition.ts +50 -0
  24. package/src/models/DemographicsFieldDefinitionWrite.ts +47 -0
  25. package/src/models/DisabilityStatusEnum.ts +14 -0
  26. package/src/models/EthnicityEnum.ts +26 -0
  27. package/src/models/FieldDefinitionImport.ts +9 -0
  28. package/src/models/FieldTypeEnum.ts +20 -0
  29. package/src/models/GenderEnum.ts +18 -0
  30. package/src/models/PatchedDemographicsFieldDefinitionWrite.ts +47 -0
  31. package/src/models/UserDemographicsResponse.ts +63 -0
  32. package/src/models/UserDemographicsWrite.ts +63 -0
  33. package/src/services/CoreService.ts +250 -0
@@ -0,0 +1,42 @@
1
+ import type { FieldTypeEnum } from './FieldTypeEnum';
2
+ export type PatchedDemographicsFieldDefinitionWrite = {
3
+ /**
4
+ * Human-readable field label displayed in forms.
5
+ */
6
+ name?: string;
7
+ /**
8
+ * URL-safe identifier used as the key in custom_fields payloads.
9
+ */
10
+ slug?: string;
11
+ /**
12
+ * Data type for this field. One of: text, number, date, boolean, select, multi_select.
13
+ *
14
+ * * `text` - Text
15
+ * * `number` - Number
16
+ * * `date` - Date
17
+ * * `boolean` - Boolean
18
+ * * `select` - Select
19
+ * * `multi_select` - Multi-select
20
+ */
21
+ field_type?: FieldTypeEnum;
22
+ /**
23
+ * Whether this field must be filled in by the user.
24
+ */
25
+ required?: boolean;
26
+ /**
27
+ * List of valid options for select/multi_select fields. Must be empty for other types.
28
+ */
29
+ choices?: any;
30
+ /**
31
+ * Sort order for rendering fields in the UI. Lower values appear first.
32
+ */
33
+ display_order?: number;
34
+ /**
35
+ * Inactive fields are hidden from forms and excluded from responses.
36
+ */
37
+ active?: boolean;
38
+ /**
39
+ * Optional description or instructions shown alongside the field.
40
+ */
41
+ description?: string;
42
+ };
@@ -0,0 +1,58 @@
1
+ import type { BlankEnum } from './BlankEnum';
2
+ import type { DisabilityStatusEnum } from './DisabilityStatusEnum';
3
+ import type { EthnicityEnum } from './EthnicityEnum';
4
+ import type { GenderEnum } from './GenderEnum';
5
+ export type UserDemographicsResponse = {
6
+ readonly username: string;
7
+ /**
8
+ * Gender identity. One of: male, female, non_binary, prefer_not_to_say, other.
9
+ *
10
+ * * `male` - Male
11
+ * * `female` - Female
12
+ * * `non_binary` - Non-binary
13
+ * * `prefer_not_to_say` - Prefer not to say
14
+ * * `other` - Other
15
+ */
16
+ gender?: (GenderEnum | BlankEnum);
17
+ /**
18
+ * Ethnic background. See Ethnicity enum for valid values.
19
+ *
20
+ * * `american_indian_alaska_native` - American Indian or Alaska Native
21
+ * * `asian` - Asian
22
+ * * `black_african_american` - Black or African American
23
+ * * `hispanic_latino` - Hispanic or Latino
24
+ * * `native_hawaiian_pacific_islander` - Native Hawaiian or Other Pacific Islander
25
+ * * `white` - White
26
+ * * `two_or_more` - Two or more races
27
+ * * `prefer_not_to_say` - Prefer not to say
28
+ * * `other` - Other
29
+ */
30
+ ethnicity?: (EthnicityEnum | BlankEnum);
31
+ /**
32
+ * Date of birth in YYYY-MM-DD format.
33
+ */
34
+ date_of_birth?: string | null;
35
+ /**
36
+ * Primary language as ISO 639-1 code, e.g. 'en', 'es'.
37
+ */
38
+ primary_language?: string;
39
+ /**
40
+ * Country of birth as ISO 3166-1 alpha-3 code, e.g. 'USA', 'MEX'.
41
+ */
42
+ country_of_birth?: string;
43
+ /**
44
+ * Nationality as ISO 3166-1 alpha-3 code, e.g. 'USA', 'MEX'.
45
+ */
46
+ nationality?: string;
47
+ /**
48
+ * Disability status. One of: yes, no, prefer_not_to_say.
49
+ *
50
+ * * `yes` - Yes
51
+ * * `no` - No
52
+ * * `prefer_not_to_say` - Prefer not to say
53
+ */
54
+ disability_status?: (DisabilityStatusEnum | BlankEnum);
55
+ readonly custom_fields: string;
56
+ readonly created_at: string;
57
+ readonly updated_at: string;
58
+ };
@@ -0,0 +1,58 @@
1
+ import type { BlankEnum } from './BlankEnum';
2
+ import type { DisabilityStatusEnum } from './DisabilityStatusEnum';
3
+ import type { EthnicityEnum } from './EthnicityEnum';
4
+ import type { GenderEnum } from './GenderEnum';
5
+ export type UserDemographicsWrite = {
6
+ /**
7
+ * Gender identity. One of: male, female, non_binary, prefer_not_to_say, other.
8
+ *
9
+ * * `male` - Male
10
+ * * `female` - Female
11
+ * * `non_binary` - Non-binary
12
+ * * `prefer_not_to_say` - Prefer not to say
13
+ * * `other` - Other
14
+ */
15
+ gender?: (GenderEnum | BlankEnum);
16
+ /**
17
+ * Ethnic background. See Ethnicity enum for valid values.
18
+ *
19
+ * * `american_indian_alaska_native` - American Indian or Alaska Native
20
+ * * `asian` - Asian
21
+ * * `black_african_american` - Black or African American
22
+ * * `hispanic_latino` - Hispanic or Latino
23
+ * * `native_hawaiian_pacific_islander` - Native Hawaiian or Other Pacific Islander
24
+ * * `white` - White
25
+ * * `two_or_more` - Two or more races
26
+ * * `prefer_not_to_say` - Prefer not to say
27
+ * * `other` - Other
28
+ */
29
+ ethnicity?: (EthnicityEnum | BlankEnum);
30
+ /**
31
+ * Date of birth in YYYY-MM-DD format.
32
+ */
33
+ date_of_birth?: string | null;
34
+ /**
35
+ * Primary language as ISO 639-1 code, e.g. 'en', 'es'.
36
+ */
37
+ primary_language?: string;
38
+ /**
39
+ * Country of birth as ISO 3166-1 alpha-3 code, e.g. 'USA', 'MEX'.
40
+ */
41
+ country_of_birth?: string;
42
+ /**
43
+ * Nationality as ISO 3166-1 alpha-3 code, e.g. 'USA', 'MEX'.
44
+ */
45
+ nationality?: string;
46
+ /**
47
+ * Disability status. One of: yes, no, prefer_not_to_say.
48
+ *
49
+ * * `yes` - Yes
50
+ * * `no` - No
51
+ * * `prefer_not_to_say` - Prefer not to say
52
+ */
53
+ disability_status?: (DisabilityStatusEnum | BlankEnum);
54
+ /**
55
+ * Custom field values as {slug: value} pairs. Slugs must match active field definitions.
56
+ */
57
+ custom_fields?: Record<string, any>;
58
+ };
@@ -1,6 +1,9 @@
1
1
  import type { CeleryHeartbeat } from '../models/CeleryHeartbeat';
2
+ import type { DemographicsFieldDefinition } from '../models/DemographicsFieldDefinition';
3
+ import type { DemographicsFieldDefinitionWrite } from '../models/DemographicsFieldDefinitionWrite';
2
4
  import type { DesiredRole } from '../models/DesiredRole';
3
5
  import type { EdxSignalReceiverRequest } from '../models/EdxSignalReceiverRequest';
6
+ import type { FieldDefinitionImport } from '../models/FieldDefinitionImport';
4
7
  import type { GroupList } from '../models/GroupList';
5
8
  import type { ImageUpload } from '../models/ImageUpload';
6
9
  import type { LauncherViewPostRequest } from '../models/LauncherViewPostRequest';
@@ -12,6 +15,7 @@ import type { PaginatedRbacGroupList } from '../models/PaginatedRbacGroupList';
12
15
  import type { PaginatedRbacPolicyList } from '../models/PaginatedRbacPolicyList';
13
16
  import type { PaginatedRbacRoleList } from '../models/PaginatedRbacRoleList';
14
17
  import type { PaginatedUserGroupList } from '../models/PaginatedUserGroupList';
18
+ import type { PatchedDemographicsFieldDefinitionWrite } from '../models/PatchedDemographicsFieldDefinitionWrite';
15
19
  import type { PatchedPlatformPublicImageAsset } from '../models/PatchedPlatformPublicImageAsset';
16
20
  import type { PatchedPlatformPublicMetadata } from '../models/PatchedPlatformPublicMetadata';
17
21
  import type { PatchedRbacGroup } from '../models/PatchedRbacGroup';
@@ -44,6 +48,8 @@ import type { TokenProxyInput } from '../models/TokenProxyInput';
44
48
  import type { TokenProxyOutput } from '../models/TokenProxyOutput';
45
49
  import type { UserDeleteAPIRequest } from '../models/UserDeleteAPIRequest';
46
50
  import type { UserDeleteAPIResponse } from '../models/UserDeleteAPIResponse';
51
+ import type { UserDemographicsResponse } from '../models/UserDemographicsResponse';
52
+ import type { UserDemographicsWrite } from '../models/UserDemographicsWrite';
47
53
  import type { UserGroup } from '../models/UserGroup';
48
54
  import type { UserGroupAccess } from '../models/UserGroupAccess';
49
55
  import type { UserGroupPolicy } from '../models/UserGroupPolicy';
@@ -667,6 +673,107 @@ export declare class CoreService {
667
673
  static corePlatformUsersPoliciesUpdate({ requestBody, }: {
668
674
  requestBody: Array<UserPolicyUpdate>;
669
675
  }): CancelablePromise<UserPolicyUpdateResponse>;
676
+ /**
677
+ * Retrieve demographics for a user. Self-access or platform admin required.
678
+ * @returns UserDemographicsResponse
679
+ * @throws ApiError
680
+ */
681
+ static corePlatformsDemographicsRetrieve({ platformKey, username, }: {
682
+ platformKey: string;
683
+ username: string;
684
+ }): CancelablePromise<UserDemographicsResponse>;
685
+ /**
686
+ * Create or update demographics for a user. Self-access or platform admin required.
687
+ * @returns UserDemographicsResponse
688
+ * @throws ApiError
689
+ */
690
+ static corePlatformsDemographicsUpdate({ platformKey, username, requestBody, }: {
691
+ platformKey: string;
692
+ username: string;
693
+ requestBody?: UserDemographicsWrite;
694
+ }): CancelablePromise<UserDemographicsResponse>;
695
+ /**
696
+ * Delete demographics for a user. Self-access or platform admin required.
697
+ * @returns void
698
+ * @throws ApiError
699
+ */
700
+ static corePlatformsDemographicsDestroy({ platformKey, username, }: {
701
+ platformKey: string;
702
+ username: string;
703
+ }): CancelablePromise<void>;
704
+ /**
705
+ * @returns DemographicsFieldDefinition
706
+ * @throws ApiError
707
+ */
708
+ static corePlatformsDemographicsFieldsList({ platformKey, }: {
709
+ platformKey: string;
710
+ }): CancelablePromise<Array<DemographicsFieldDefinition>>;
711
+ /**
712
+ * Create a custom demographics field definition for the platform.
713
+ * @returns DemographicsFieldDefinition
714
+ * @throws ApiError
715
+ */
716
+ static corePlatformsDemographicsFieldsCreate({ platformKey, requestBody, }: {
717
+ platformKey: string;
718
+ requestBody: DemographicsFieldDefinitionWrite;
719
+ }): CancelablePromise<DemographicsFieldDefinition>;
720
+ /**
721
+ * @returns DemographicsFieldDefinition
722
+ * @throws ApiError
723
+ */
724
+ static corePlatformsDemographicsFieldsRetrieve({ platformKey, slug, }: {
725
+ platformKey: string;
726
+ slug: string;
727
+ }): CancelablePromise<DemographicsFieldDefinition>;
728
+ /**
729
+ * Update a custom demographics field definition.
730
+ * @returns DemographicsFieldDefinition
731
+ * @throws ApiError
732
+ */
733
+ static corePlatformsDemographicsFieldsUpdate({ platformKey, slug, requestBody, }: {
734
+ platformKey: string;
735
+ slug: string;
736
+ requestBody: DemographicsFieldDefinitionWrite;
737
+ }): CancelablePromise<DemographicsFieldDefinition>;
738
+ /**
739
+ * Partially update a custom demographics field definition.
740
+ * @returns DemographicsFieldDefinition
741
+ * @throws ApiError
742
+ */
743
+ static corePlatformsDemographicsFieldsPartialUpdate({ platformKey, slug, requestBody, }: {
744
+ platformKey: string;
745
+ slug: string;
746
+ requestBody?: PatchedDemographicsFieldDefinitionWrite;
747
+ }): CancelablePromise<DemographicsFieldDefinition>;
748
+ /**
749
+ * @returns void
750
+ * @throws ApiError
751
+ */
752
+ static corePlatformsDemographicsFieldsDestroy({ platformKey, slug, }: {
753
+ platformKey: string;
754
+ slug: string;
755
+ }): CancelablePromise<void>;
756
+ /**
757
+ * Export all field definitions for the platform as JSON or CSV.
758
+ * @returns DemographicsFieldDefinition
759
+ * @throws ApiError
760
+ */
761
+ static corePlatformsDemographicsFieldsExportList({ platformKey, exportFormat, }: {
762
+ platformKey: string;
763
+ /**
764
+ * Export format: json or csv
765
+ */
766
+ exportFormat?: 'csv' | 'json';
767
+ }): CancelablePromise<Array<DemographicsFieldDefinition>>;
768
+ /**
769
+ * Import field definitions from JSON or CSV file. Returns 207 on partial success.
770
+ * @returns any No response body
771
+ * @throws ApiError
772
+ */
773
+ static corePlatformsDemographicsFieldsImportCreate({ platformKey, requestBody, }: {
774
+ platformKey: string;
775
+ requestBody?: FieldDefinitionImport;
776
+ }): CancelablePromise<any>;
670
777
  /**
671
778
  * Shared functionality for platform public image asset views.
672
779
  * @returns PlatformPublicImageAsset
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iblai/iblai-api",
3
- "version": "4.243.2-core",
3
+ "version": "4.245.0-core",
4
4
  "main": "dist/index.cjs.js",
5
5
  "module": "dist/index.esm.js",
6
6
  "type": "module",