MM-62543: CPA sequential write ops & better validation (#29933)

* sequential write operations

* group_id required

* warn against names already in use

* add tests

* fix lint

* i18n
Этот коммит содержится в:
Caleb Roseland
2025-01-28 08:28:43 -06:00
коммит произвёл GitHub
родитель afbd9d64c3
Коммит 3b69d36643
8 изменённых файлов: 511 добавлений и 109 удалений

Просмотреть файл

@@ -3,7 +3,7 @@
export type PropertyField = {
id: string;
group_id?: string;
group_id: string;
name: string;
type: string;
attrs?: {[key: string]: unknown};
@@ -26,9 +26,10 @@ export type PropertyValue<T> = {
}
export type UserPropertyFieldType = 'text';
export type UserPropertyFieldGroupID = 'user_properties';
export type UserPropertyFieldGroupID = 'custom_profile_attributes';
export type UserPropertyField = PropertyField & {
type: UserPropertyFieldType;
group_id: UserPropertyFieldGroupID;
}
export type UserPropertyFieldPatch = Partial<Pick<UserPropertyField, 'name' | 'attrs' | 'type'>>;