@prismicio/editor-fields 0.4.57 → 0.4.58-alpha.repeatable-link-base.0

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/EditorConfig.d.ts +2 -0
  2. package/dist/FieldContext.d.ts +5 -0
  3. package/dist/core/MediaLibrary/hooks/mediaLibraryData.d.ts +62 -62
  4. package/dist/core/MediaLibrary/hooks/tagData.d.ts +3 -3
  5. package/dist/core/MediaLibrary/hooks/useSelectedMedia.d.ts +6 -6
  6. package/dist/core/service/customType.d.ts +13 -0
  7. package/dist/core/service/document.d.ts +1669 -418
  8. package/dist/core/service/documentSearch.d.ts +214 -0
  9. package/dist/core/service/index.d.ts +2 -0
  10. package/dist/core/service/repository.d.ts +29 -21
  11. package/dist/core/service/teamSpace.d.ts +48 -0
  12. package/dist/core/service/user.d.ts +112 -6
  13. package/dist/fields/IntegrationField/integrationData.d.ts +5 -5
  14. package/dist/fields/LinkField/Documents/DocumentCard.d.ts +1 -1
  15. package/dist/fields/LinkField/Documents/documentsData.d.ts +73 -44
  16. package/dist/fields/LinkField/LinkField.d.ts +4 -3
  17. package/dist/fields/LinkField/LinkOrRepeatableLinkField.d.ts +12 -0
  18. package/dist/fields/LinkField/RepeatableLinkField/RepeatableLinkField.d.ts +11 -0
  19. package/dist/fields/LinkField/RepeatableLinkField/RepeatableLinkFieldActions.d.ts +11 -0
  20. package/dist/fields/LinkField/RepeatableLinkField/index.d.ts +1 -0
  21. package/dist/fields/LinkField/RepeatableLinkField/useRepeatableLinkField.d.ts +84 -0
  22. package/dist/fields/LinkField/index.d.ts +1 -0
  23. package/dist/fields/LinkField/useLinkField.d.ts +6 -3
  24. package/dist/fields/RichTextField/coreExtensions/ListItem.d.ts +6 -6
  25. package/dist/fields/RichTextField/extensions/Embed/EmbedView.d.ts +1 -1
  26. package/dist/fields/RichTextField/extensions/Image/ImageView.d.ts +1 -1
  27. package/dist/fields/RichTextField/extensions/Link/LinkModel.d.ts +2 -2
  28. package/dist/index.cjs.js +37 -39
  29. package/dist/index.es.js +25902 -22602
  30. package/dist/slices/utils.d.ts +101 -27
  31. package/package.json +25 -24
  32. package/dist/fields/LinkField/RepeatableLinkField.d.ts +0 -12
  33. package/dist/fields/RichTextField/extensions/Image/ImageLinkControl.d.ts +0 -9
@@ -0,0 +1,214 @@
1
+ import { type AuthStrategy, type EditorConfig } from "../../EditorConfig";
2
+ import { type DocumentVersion } from "./document";
3
+ interface SearchDocumentsArgs {
4
+ coreApiBaseUrl: URL;
5
+ documentSearchBaseUrl: URL;
6
+ authStrategy: AuthStrategy;
7
+ repository: string;
8
+ searchTerm: string;
9
+ customTypes: string[];
10
+ tags: string[];
11
+ status: DocumentVersion["status"][];
12
+ locale: string;
13
+ searchDocumentsWithInterestingVersions: boolean;
14
+ track: ((args: {
15
+ numberOfResults: number;
16
+ searchQuery: string;
17
+ numberOfWords: number;
18
+ timeToGetResultsInMs: number;
19
+ }) => void) | undefined;
20
+ signal: AbortSignal;
21
+ }
22
+ export declare function searchDocuments(args: SearchDocumentsArgs): Promise<{
23
+ results: {
24
+ id: string;
25
+ title: string;
26
+ custom_type_id: string;
27
+ group_lang_id: string;
28
+ locale_id?: string | undefined;
29
+ versions: (({
30
+ status: "unclassified";
31
+ } | {
32
+ status: "published";
33
+ } | {
34
+ status: "release";
35
+ release_id: string;
36
+ } | {
37
+ status: "archived";
38
+ }) & {
39
+ tags: string[];
40
+ version_id: string;
41
+ last_modified_date: Date;
42
+ summary?: string | undefined;
43
+ preview_image?: string | undefined;
44
+ uid?: string | undefined;
45
+ custom_type_id?: string | undefined;
46
+ author_ids?: string[] | undefined;
47
+ })[];
48
+ }[];
49
+ }>;
50
+ interface searchDocumentsQueryOptionsArgs {
51
+ searchTerm: string;
52
+ customTypes: string[];
53
+ tags: string[];
54
+ status: DocumentVersion["status"][];
55
+ locale: string;
56
+ config: SearchDocumentsConfig;
57
+ track?: (args: {
58
+ numberOfResults: number;
59
+ searchQuery: string;
60
+ numberOfWords: number;
61
+ timeToGetResultsInMs: number;
62
+ }) => void;
63
+ }
64
+ export declare function searchDocumentsQueryOptions(args: searchDocumentsQueryOptionsArgs): import("@tanstack/react-query/build/legacy/types").UseQueryOptions<{
65
+ results: {
66
+ id: string;
67
+ title: string;
68
+ custom_type_id: string;
69
+ group_lang_id: string;
70
+ locale_id?: string | undefined;
71
+ versions: (({
72
+ status: "unclassified";
73
+ } | {
74
+ status: "published";
75
+ } | {
76
+ status: "release";
77
+ release_id: string;
78
+ } | {
79
+ status: "archived";
80
+ }) & {
81
+ tags: string[];
82
+ version_id: string;
83
+ last_modified_date: Date;
84
+ summary?: string | undefined;
85
+ preview_image?: string | undefined;
86
+ uid?: string | undefined;
87
+ custom_type_id?: string | undefined;
88
+ author_ids?: string[] | undefined;
89
+ })[];
90
+ }[];
91
+ }, Error, {
92
+ results: {
93
+ id: string;
94
+ title: string;
95
+ custom_type_id: string;
96
+ group_lang_id: string;
97
+ locale_id?: string | undefined;
98
+ versions: (({
99
+ status: "unclassified";
100
+ } | {
101
+ status: "published";
102
+ } | {
103
+ status: "release";
104
+ release_id: string;
105
+ } | {
106
+ status: "archived";
107
+ }) & {
108
+ tags: string[];
109
+ version_id: string;
110
+ last_modified_date: Date;
111
+ summary?: string | undefined;
112
+ preview_image?: string | undefined;
113
+ uid?: string | undefined;
114
+ custom_type_id?: string | undefined;
115
+ author_ids?: string[] | undefined;
116
+ })[];
117
+ }[];
118
+ }, readonly ["searchDocuments", {
119
+ readonly coreApiBaseUrl: URL;
120
+ readonly documentSearchBaseUrl: URL;
121
+ readonly authStrategy: AuthStrategy;
122
+ readonly repository: string;
123
+ readonly searchTerm: string;
124
+ readonly customTypes: string[];
125
+ readonly tags: string[];
126
+ readonly status: ("published" | "release" | "archived" | "unclassified")[];
127
+ readonly locale: string;
128
+ readonly searchDocumentsWithInterestingVersions: boolean;
129
+ readonly track: ((args: {
130
+ numberOfResults: number;
131
+ searchQuery: string;
132
+ numberOfWords: number;
133
+ timeToGetResultsInMs: number;
134
+ }) => void) | undefined;
135
+ }]> & {
136
+ initialData?: import("@tanstack/query-core/build/legacy/hydration-DTVzC0E7").L<{
137
+ results: {
138
+ id: string;
139
+ title: string;
140
+ custom_type_id: string;
141
+ group_lang_id: string;
142
+ locale_id?: string | undefined;
143
+ versions: (({
144
+ status: "unclassified";
145
+ } | {
146
+ status: "published";
147
+ } | {
148
+ status: "release";
149
+ release_id: string;
150
+ } | {
151
+ status: "archived";
152
+ }) & {
153
+ tags: string[];
154
+ version_id: string;
155
+ last_modified_date: Date;
156
+ summary?: string | undefined;
157
+ preview_image?: string | undefined;
158
+ uid?: string | undefined;
159
+ custom_type_id?: string | undefined;
160
+ author_ids?: string[] | undefined;
161
+ })[];
162
+ }[];
163
+ }> | undefined;
164
+ } & {
165
+ queryKey: import("@tanstack/query-core/build/legacy/hydration-DTVzC0E7").E<readonly ["searchDocuments", {
166
+ readonly coreApiBaseUrl: URL;
167
+ readonly documentSearchBaseUrl: URL;
168
+ readonly authStrategy: AuthStrategy;
169
+ readonly repository: string;
170
+ readonly searchTerm: string;
171
+ readonly customTypes: string[];
172
+ readonly tags: string[];
173
+ readonly status: ("published" | "release" | "archived" | "unclassified")[];
174
+ readonly locale: string;
175
+ readonly searchDocumentsWithInterestingVersions: boolean;
176
+ readonly track: ((args: {
177
+ numberOfResults: number;
178
+ searchQuery: string;
179
+ numberOfWords: number;
180
+ timeToGetResultsInMs: number;
181
+ }) => void) | undefined;
182
+ }], {
183
+ results: {
184
+ id: string;
185
+ title: string;
186
+ custom_type_id: string;
187
+ group_lang_id: string;
188
+ locale_id?: string | undefined;
189
+ versions: (({
190
+ status: "unclassified";
191
+ } | {
192
+ status: "published";
193
+ } | {
194
+ status: "release";
195
+ release_id: string;
196
+ } | {
197
+ status: "archived";
198
+ }) & {
199
+ tags: string[];
200
+ version_id: string;
201
+ last_modified_date: Date;
202
+ summary?: string | undefined;
203
+ preview_image?: string | undefined;
204
+ uid?: string | undefined;
205
+ custom_type_id?: string | undefined;
206
+ author_ids?: string[] | undefined;
207
+ })[];
208
+ }[];
209
+ }>;
210
+ };
211
+ type SearchDocumentsConfig = Pick<EditorConfig & {
212
+ searchDocuments: true;
213
+ }, "authStrategy" | "coreApiBaseUrl" | "documentSearchBaseUrl" | "repository" | "searchDocuments" | "searchDocumentsWithInterestingVersions">;
214
+ export {};
@@ -1,5 +1,7 @@
1
1
  export * from "./customType";
2
2
  export * from "./document";
3
+ export * from "./documentSearch";
3
4
  export * from "./onboarding";
4
5
  export * from "./repository";
6
+ export * from "./teamSpace";
5
7
  export * from "./user";
@@ -9,15 +9,15 @@ declare const repositoryAuthor: z.ZodObject<{
9
9
  }, "strip", z.ZodTypeAny, {
10
10
  id: string;
11
11
  email: string;
12
+ uploadedAvatar?: string | undefined;
12
13
  firstname?: string | undefined;
13
14
  lastname?: string | undefined;
14
- uploadedAvatar?: string | undefined;
15
15
  }, {
16
16
  id: string;
17
17
  email: string;
18
+ uploadedAvatar?: string | undefined;
18
19
  firstname?: string | undefined;
19
20
  lastname?: string | undefined;
20
- uploadedAvatar?: string | undefined;
21
21
  }>;
22
22
  export type RepositoryAuthor = z.TypeOf<typeof repositoryAuthor>;
23
23
  declare const repositoryQuotas: z.ZodObject<{
@@ -32,7 +32,7 @@ export declare const repositoryFramework: z.ZodEffects<z.ZodEnum<["next", "nuxt"
32
32
  export type RepositoryFramework = z.TypeOf<typeof repositoryFramework>;
33
33
  declare const repositorySchema: z.ZodEffects<z.ZodObject<{
34
34
  simulator_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
35
- languages: z.ZodEffects<z.ZodArray<z.ZodObject<{
35
+ languages: z.ZodEffects<z.ZodArray<z.ZodEffects<z.ZodObject<{
36
36
  id: z.ZodString;
37
37
  name: z.ZodString;
38
38
  is_master: z.ZodOptional<z.ZodBoolean>;
@@ -44,10 +44,18 @@ declare const repositorySchema: z.ZodEffects<z.ZodObject<{
44
44
  id: string;
45
45
  name: string;
46
46
  is_master?: boolean | undefined;
47
- }>, "many">, {
47
+ }>, {
48
+ isMaster?: boolean | undefined;
49
+ id: string;
50
+ label: string;
51
+ }, {
48
52
  id: string;
49
53
  name: string;
50
54
  is_master?: boolean | undefined;
55
+ }>, "many">, {
56
+ isMaster?: boolean | undefined;
57
+ id: string;
58
+ label: string;
51
59
  }[], {
52
60
  id: string;
53
61
  name: string;
@@ -62,15 +70,15 @@ declare const repositorySchema: z.ZodEffects<z.ZodObject<{
62
70
  }, "strip", z.ZodTypeAny, {
63
71
  id: string;
64
72
  email: string;
73
+ uploadedAvatar?: string | undefined;
65
74
  firstname?: string | undefined;
66
75
  lastname?: string | undefined;
67
- uploadedAvatar?: string | undefined;
68
76
  }, {
69
77
  id: string;
70
78
  email: string;
79
+ uploadedAvatar?: string | undefined;
71
80
  firstname?: string | undefined;
72
81
  lastname?: string | undefined;
73
- uploadedAvatar?: string | undefined;
74
82
  }>, "many">>>;
75
83
  quotas: z.ZodDefault<z.ZodOptional<z.ZodObject<{
76
84
  slicemachineEnabled: z.ZodBoolean;
@@ -96,26 +104,26 @@ declare const repositorySchema: z.ZodEffects<z.ZodObject<{
96
104
  authors: {
97
105
  id: string;
98
106
  email: string;
107
+ uploadedAvatar?: string | undefined;
99
108
  firstname?: string | undefined;
100
109
  lastname?: string | undefined;
101
- uploadedAvatar?: string | undefined;
102
110
  }[];
103
- framework: "next" | "nuxt" | "sveltekit" | "other";
104
111
  languages: {
112
+ isMaster?: boolean | undefined;
105
113
  id: string;
106
- name: string;
107
- is_master?: boolean | undefined;
114
+ label: string;
108
115
  }[];
109
116
  quotas: {
110
117
  slicemachineEnabled: boolean;
111
118
  };
119
+ framework: "next" | "nuxt" | "sveltekit" | "other";
112
120
  storageVersion: {
113
121
  major: number;
114
122
  minor: number;
115
123
  };
124
+ uploadedAvatar?: string | undefined;
116
125
  simulator_url?: string | null | undefined;
117
126
  starterId?: string | undefined;
118
- uploadedAvatar?: string | undefined;
119
127
  }, {
120
128
  languages: {
121
129
  id: string;
@@ -126,20 +134,20 @@ declare const repositorySchema: z.ZodEffects<z.ZodObject<{
126
134
  major: number;
127
135
  minor: number;
128
136
  };
129
- simulator_url?: string | null | undefined;
137
+ uploadedAvatar?: string | undefined;
130
138
  authors?: {
131
139
  id: string;
132
140
  email: string;
141
+ uploadedAvatar?: string | undefined;
133
142
  firstname?: string | undefined;
134
143
  lastname?: string | undefined;
135
- uploadedAvatar?: string | undefined;
136
144
  }[] | undefined;
145
+ simulator_url?: string | null | undefined;
137
146
  quotas?: {
138
147
  slicemachineEnabled: boolean;
139
148
  } | undefined;
140
149
  framework?: unknown;
141
150
  starterId?: string | undefined;
142
- uploadedAvatar?: string | undefined;
143
151
  }>, {
144
152
  framework: "next" | "nuxt" | "sveltekit" | "other";
145
153
  simulatorUrl: string | undefined;
@@ -147,14 +155,14 @@ declare const repositorySchema: z.ZodEffects<z.ZodObject<{
147
155
  authors: {
148
156
  id: string;
149
157
  email: string;
158
+ uploadedAvatar?: string | undefined;
150
159
  firstname?: string | undefined;
151
160
  lastname?: string | undefined;
152
- uploadedAvatar?: string | undefined;
153
161
  }[];
154
162
  languages: {
163
+ isMaster?: boolean | undefined;
155
164
  id: string;
156
- name: string;
157
- is_master?: boolean | undefined;
165
+ label: string;
158
166
  }[];
159
167
  quotas: {
160
168
  slicemachineEnabled: boolean;
@@ -163,8 +171,8 @@ declare const repositorySchema: z.ZodEffects<z.ZodObject<{
163
171
  major: number;
164
172
  minor: number;
165
173
  };
166
- starterId?: string | undefined;
167
174
  uploadedAvatar?: string | undefined;
175
+ starterId?: string | undefined;
168
176
  }, {
169
177
  languages: {
170
178
  id: string;
@@ -175,20 +183,20 @@ declare const repositorySchema: z.ZodEffects<z.ZodObject<{
175
183
  major: number;
176
184
  minor: number;
177
185
  };
178
- simulator_url?: string | null | undefined;
186
+ uploadedAvatar?: string | undefined;
179
187
  authors?: {
180
188
  id: string;
181
189
  email: string;
190
+ uploadedAvatar?: string | undefined;
182
191
  firstname?: string | undefined;
183
192
  lastname?: string | undefined;
184
- uploadedAvatar?: string | undefined;
185
193
  }[] | undefined;
194
+ simulator_url?: string | null | undefined;
186
195
  quotas?: {
187
196
  slicemachineEnabled: boolean;
188
197
  } | undefined;
189
198
  framework?: unknown;
190
199
  starterId?: string | undefined;
191
- uploadedAvatar?: string | undefined;
192
200
  }>;
193
201
  export type Repository = z.TypeOf<typeof repositorySchema>;
194
202
  export declare function getRepository(baseUrl: URL, authStrategy: AuthStrategy): Promise<Repository>;
@@ -0,0 +1,48 @@
1
+ import { z } from "zod";
2
+ import type { AuthStrategy } from "../../EditorConfig";
3
+ export declare const LocaleId: z.ZodString;
4
+ export declare const BasicRole: z.ZodEnum<["Manager", "Writer", "Readonly"]>;
5
+ export declare const RolesPerLocale: z.ZodRecord<z.ZodString, z.ZodEnum<["Manager", "Writer", "Readonly"]>>;
6
+ export type RolesPerLocale = z.infer<typeof RolesPerLocale>;
7
+ export declare const RolesPerLocaleByUser: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodEnum<["Manager", "Writer", "Readonly"]>>>;
8
+ export type RolesPerLocaleByUser = z.infer<typeof RolesPerLocaleByUser>;
9
+ export declare const TeamSpace: z.ZodObject<{
10
+ id: z.ZodString;
11
+ name: z.ZodString;
12
+ customTypes: z.ZodArray<z.ZodString, "many">;
13
+ rolesPerLocale: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<["Manager", "Writer", "Readonly"]>>>;
14
+ rolesPerLocaleByUser: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodEnum<["Manager", "Writer", "Readonly"]>>>>;
15
+ }, "strip", z.ZodTypeAny, {
16
+ id: string;
17
+ name: string;
18
+ customTypes: string[];
19
+ rolesPerLocale?: Record<string, "Manager" | "Writer" | "Readonly"> | undefined;
20
+ rolesPerLocaleByUser?: Record<string, Record<string, "Manager" | "Writer" | "Readonly">> | undefined;
21
+ }, {
22
+ id: string;
23
+ name: string;
24
+ customTypes: string[];
25
+ rolesPerLocale?: Record<string, "Manager" | "Writer" | "Readonly"> | undefined;
26
+ rolesPerLocaleByUser?: Record<string, Record<string, "Manager" | "Writer" | "Readonly">> | undefined;
27
+ }>;
28
+ export type TeamSpace = z.infer<typeof TeamSpace>;
29
+ declare const TeamSpaceUpsert: z.ZodObject<{
30
+ name: z.ZodString;
31
+ customTypes: z.ZodArray<z.ZodString, "many">;
32
+ rolesPerLocale: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<["Manager", "Writer", "Readonly"]>>>;
33
+ rolesPerLocaleByUser: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodEnum<["Manager", "Writer", "Readonly"]>>>>;
34
+ }, "strip", z.ZodTypeAny, {
35
+ name: string;
36
+ customTypes: string[];
37
+ rolesPerLocale?: Record<string, "Manager" | "Writer" | "Readonly"> | undefined;
38
+ rolesPerLocaleByUser?: Record<string, Record<string, "Manager" | "Writer" | "Readonly">> | undefined;
39
+ }, {
40
+ name: string;
41
+ customTypes: string[];
42
+ rolesPerLocale?: Record<string, "Manager" | "Writer" | "Readonly"> | undefined;
43
+ rolesPerLocaleByUser?: Record<string, Record<string, "Manager" | "Writer" | "Readonly">> | undefined;
44
+ }>;
45
+ export type TeamSpaceUpsert = z.infer<typeof TeamSpaceUpsert>;
46
+ export declare function createTeamSpace(baseUrl: URL, repository: string, authStrategy: AuthStrategy, payload: TeamSpaceUpsert): Promise<TeamSpace>;
47
+ export declare function updateTeamSpace(baseUrl: URL, repository: string, authStrategy: AuthStrategy, payload: TeamSpaceUpsert, teamSpaceId: string): Promise<TeamSpace>;
48
+ export {};
@@ -20,13 +20,16 @@ export declare const profileResponse: z.ZodObject<{
20
20
  superPower: z.ZodBoolean;
21
21
  repositories: z.ZodArray<z.ZodObject<{
22
22
  domain: z.ZodString;
23
+ name: z.ZodOptional<z.ZodString>;
23
24
  role: z.ZodUnion<[z.ZodEnum<["Owner", "Administrator", "Writer", "Manager", "Readonly"]>, z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodEnum<["Owner", "Administrator", "Writer", "Manager", "Readonly"]>>>]>;
24
25
  }, "strip", z.ZodTypeAny, {
25
- role: ("Owner" | "Administrator" | "Writer" | "Manager" | "Readonly" | Record<string, "Owner" | "Administrator" | "Writer" | "Manager" | "Readonly" | undefined>) & ("Owner" | "Administrator" | "Writer" | "Manager" | "Readonly" | Record<string, "Owner" | "Administrator" | "Writer" | "Manager" | "Readonly" | undefined> | undefined);
26
26
  domain: string;
27
+ role: "Manager" | "Writer" | "Readonly" | "Owner" | "Administrator" | Record<string, "Manager" | "Writer" | "Readonly" | "Owner" | "Administrator" | undefined>;
28
+ name?: string | undefined;
27
29
  }, {
28
- role: ("Owner" | "Administrator" | "Writer" | "Manager" | "Readonly" | Record<string, "Owner" | "Administrator" | "Writer" | "Manager" | "Readonly" | undefined>) & ("Owner" | "Administrator" | "Writer" | "Manager" | "Readonly" | Record<string, "Owner" | "Administrator" | "Writer" | "Manager" | "Readonly" | undefined> | undefined);
29
30
  domain: string;
31
+ role: "Manager" | "Writer" | "Readonly" | "Owner" | "Administrator" | Record<string, "Manager" | "Writer" | "Readonly" | "Owner" | "Administrator" | undefined>;
32
+ name?: string | undefined;
30
33
  }>, "many">;
31
34
  }, "strip", z.ZodTypeAny, {
32
35
  email: string;
@@ -36,8 +39,9 @@ export declare const profileResponse: z.ZodObject<{
36
39
  lastName: string;
37
40
  superPower: boolean;
38
41
  repositories: {
39
- role: ("Owner" | "Administrator" | "Writer" | "Manager" | "Readonly" | Record<string, "Owner" | "Administrator" | "Writer" | "Manager" | "Readonly" | undefined>) & ("Owner" | "Administrator" | "Writer" | "Manager" | "Readonly" | Record<string, "Owner" | "Administrator" | "Writer" | "Manager" | "Readonly" | undefined> | undefined);
40
42
  domain: string;
43
+ role: "Manager" | "Writer" | "Readonly" | "Owner" | "Administrator" | Record<string, "Manager" | "Writer" | "Readonly" | "Owner" | "Administrator" | undefined>;
44
+ name?: string | undefined;
41
45
  }[];
42
46
  }, {
43
47
  email: string;
@@ -47,12 +51,106 @@ export declare const profileResponse: z.ZodObject<{
47
51
  lastName: string;
48
52
  superPower: boolean;
49
53
  repositories: {
50
- role: ("Owner" | "Administrator" | "Writer" | "Manager" | "Readonly" | Record<string, "Owner" | "Administrator" | "Writer" | "Manager" | "Readonly" | undefined>) & ("Owner" | "Administrator" | "Writer" | "Manager" | "Readonly" | Record<string, "Owner" | "Administrator" | "Writer" | "Manager" | "Readonly" | undefined> | undefined);
51
54
  domain: string;
55
+ role: "Manager" | "Writer" | "Readonly" | "Owner" | "Administrator" | Record<string, "Manager" | "Writer" | "Readonly" | "Owner" | "Administrator" | undefined>;
56
+ name?: string | undefined;
52
57
  }[];
53
58
  }>;
54
59
  export type Profile = z.infer<typeof profileResponse>;
55
- export declare function getProfile(userServiceBaseUrl: URL, authStrategy: AuthStrategy): Promise<Profile>;
60
+ export declare const profileWithTeamSpacesResponse: z.ZodObject<{
61
+ shortId: z.ZodString;
62
+ intercomHash: z.ZodString;
63
+ email: z.ZodString;
64
+ firstName: z.ZodString;
65
+ lastName: z.ZodString;
66
+ superPower: z.ZodBoolean;
67
+ repositories: z.ZodArray<z.ZodObject<{
68
+ domain: z.ZodString;
69
+ name: z.ZodOptional<z.ZodString>;
70
+ role: z.ZodUnion<[z.ZodEnum<["Owner", "Administrator", "Writer", "Manager", "Readonly"]>, z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodEnum<["Owner", "Administrator", "Writer", "Manager", "Readonly"]>>>]>;
71
+ teamSpaces: z.ZodOptional<z.ZodArray<z.ZodObject<{
72
+ id: z.ZodString;
73
+ name: z.ZodString;
74
+ customTypes: z.ZodArray<z.ZodString, "many">;
75
+ rolesPerLocale: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<["Manager", "Writer", "Readonly"]>>>;
76
+ rolesPerLocaleByUser: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodEnum<["Manager", "Writer", "Readonly"]>>>>;
77
+ }, "strip", z.ZodTypeAny, {
78
+ id: string;
79
+ name: string;
80
+ customTypes: string[];
81
+ rolesPerLocale?: Record<string, "Manager" | "Writer" | "Readonly"> | undefined;
82
+ rolesPerLocaleByUser?: Record<string, Record<string, "Manager" | "Writer" | "Readonly">> | undefined;
83
+ }, {
84
+ id: string;
85
+ name: string;
86
+ customTypes: string[];
87
+ rolesPerLocale?: Record<string, "Manager" | "Writer" | "Readonly"> | undefined;
88
+ rolesPerLocaleByUser?: Record<string, Record<string, "Manager" | "Writer" | "Readonly">> | undefined;
89
+ }>, "many">>;
90
+ }, "strip", z.ZodTypeAny, {
91
+ domain: string;
92
+ role: "Manager" | "Writer" | "Readonly" | "Owner" | "Administrator" | Record<string, "Manager" | "Writer" | "Readonly" | "Owner" | "Administrator" | undefined>;
93
+ name?: string | undefined;
94
+ teamSpaces?: {
95
+ id: string;
96
+ name: string;
97
+ customTypes: string[];
98
+ rolesPerLocale?: Record<string, "Manager" | "Writer" | "Readonly"> | undefined;
99
+ rolesPerLocaleByUser?: Record<string, Record<string, "Manager" | "Writer" | "Readonly">> | undefined;
100
+ }[] | undefined;
101
+ }, {
102
+ domain: string;
103
+ role: "Manager" | "Writer" | "Readonly" | "Owner" | "Administrator" | Record<string, "Manager" | "Writer" | "Readonly" | "Owner" | "Administrator" | undefined>;
104
+ name?: string | undefined;
105
+ teamSpaces?: {
106
+ id: string;
107
+ name: string;
108
+ customTypes: string[];
109
+ rolesPerLocale?: Record<string, "Manager" | "Writer" | "Readonly"> | undefined;
110
+ rolesPerLocaleByUser?: Record<string, Record<string, "Manager" | "Writer" | "Readonly">> | undefined;
111
+ }[] | undefined;
112
+ }>, "many">;
113
+ }, "strip", z.ZodTypeAny, {
114
+ email: string;
115
+ shortId: string;
116
+ intercomHash: string;
117
+ firstName: string;
118
+ lastName: string;
119
+ superPower: boolean;
120
+ repositories: {
121
+ domain: string;
122
+ role: "Manager" | "Writer" | "Readonly" | "Owner" | "Administrator" | Record<string, "Manager" | "Writer" | "Readonly" | "Owner" | "Administrator" | undefined>;
123
+ name?: string | undefined;
124
+ teamSpaces?: {
125
+ id: string;
126
+ name: string;
127
+ customTypes: string[];
128
+ rolesPerLocale?: Record<string, "Manager" | "Writer" | "Readonly"> | undefined;
129
+ rolesPerLocaleByUser?: Record<string, Record<string, "Manager" | "Writer" | "Readonly">> | undefined;
130
+ }[] | undefined;
131
+ }[];
132
+ }, {
133
+ email: string;
134
+ shortId: string;
135
+ intercomHash: string;
136
+ firstName: string;
137
+ lastName: string;
138
+ superPower: boolean;
139
+ repositories: {
140
+ domain: string;
141
+ role: "Manager" | "Writer" | "Readonly" | "Owner" | "Administrator" | Record<string, "Manager" | "Writer" | "Readonly" | "Owner" | "Administrator" | undefined>;
142
+ name?: string | undefined;
143
+ teamSpaces?: {
144
+ id: string;
145
+ name: string;
146
+ customTypes: string[];
147
+ rolesPerLocale?: Record<string, "Manager" | "Writer" | "Readonly"> | undefined;
148
+ rolesPerLocaleByUser?: Record<string, Record<string, "Manager" | "Writer" | "Readonly">> | undefined;
149
+ }[] | undefined;
150
+ }[];
151
+ }>;
152
+ export type ProfileWithTeamSpaces = z.infer<typeof profileWithTeamSpacesResponse>;
153
+ export declare function getProfile(userServiceBaseUrl: URL, authStrategy: AuthStrategy): Promise<ProfileWithTeamSpaces>;
56
154
  export declare function useProfile(): {
57
155
  email: string;
58
156
  shortId: string;
@@ -61,8 +159,16 @@ export declare function useProfile(): {
61
159
  lastName: string;
62
160
  superPower: boolean;
63
161
  repositories: {
64
- role: ("Owner" | "Administrator" | "Writer" | "Manager" | "Readonly" | Record<string, "Owner" | "Administrator" | "Writer" | "Manager" | "Readonly" | undefined>) & ("Owner" | "Administrator" | "Writer" | "Manager" | "Readonly" | Record<string, "Owner" | "Administrator" | "Writer" | "Manager" | "Readonly" | undefined> | undefined);
65
162
  domain: string;
163
+ role: "Manager" | "Writer" | "Readonly" | "Owner" | "Administrator" | Record<string, "Manager" | "Writer" | "Readonly" | "Owner" | "Administrator" | undefined>;
164
+ name?: string | undefined;
165
+ teamSpaces?: {
166
+ id: string;
167
+ name: string;
168
+ customTypes: string[];
169
+ rolesPerLocale?: Record<string, "Manager" | "Writer" | "Readonly"> | undefined;
170
+ rolesPerLocaleByUser?: Record<string, Record<string, "Manager" | "Writer" | "Readonly">> | undefined;
171
+ }[] | undefined;
66
172
  }[];
67
173
  };
68
174
  export {};
@@ -7,16 +7,16 @@ export declare function useIntegrationCatalogSearch(args: IntegrationCatalogSear
7
7
  items: {
8
8
  id: string;
9
9
  title: string;
10
- imageURL?: string | undefined;
11
10
  description?: string | undefined;
11
+ imageURL?: string | undefined;
12
12
  }[];
13
13
  response: {
14
14
  page: number;
15
15
  items: {
16
16
  id: string;
17
17
  title: string;
18
- imageURL?: string | undefined;
19
18
  description?: string | undefined;
19
+ imageURL?: string | undefined;
20
20
  }[];
21
21
  totalPages: number;
22
22
  };
@@ -31,13 +31,13 @@ declare const integrationItem: z.ZodObject<{
31
31
  }, "strip", z.ZodTypeAny, {
32
32
  id: string;
33
33
  title: string;
34
- imageURL?: string | undefined;
35
34
  description?: string | undefined;
35
+ imageURL?: string | undefined;
36
36
  }, {
37
37
  id: string;
38
38
  title: string;
39
- imageURL?: string | undefined;
40
39
  description?: string | undefined;
40
+ imageURL?: string | undefined;
41
41
  }>;
42
42
  export type IntegrationItem = z.TypeOf<typeof integrationItem>;
43
43
  interface IntegrationCatalogReadArgs {
@@ -48,8 +48,8 @@ export declare function useIntegrationCatalogRead(args: IntegrationCatalogReadAr
48
48
  item: {
49
49
  id: string;
50
50
  title: string;
51
- imageURL?: string | undefined;
52
51
  description?: string | undefined;
52
+ imageURL?: string | undefined;
53
53
  };
54
54
  };
55
55
  export {};
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { type FilterOption } from "@prismicio/editor-ui";
3
3
  export interface DocumentCardProps {
4
- documentType: string;
4
+ documentTypeId: string;
5
5
  documentUrl: URL;
6
6
  title: string;
7
7
  statusColor: "grey" | "green" | "amber" | "purple";