@wix/user-management 1.0.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.
@@ -0,0 +1,219 @@
1
+ interface AccountV2$1 {
2
+ /** Account ID. */
3
+ accountId?: string;
4
+ }
5
+ interface Paging$1 {
6
+ /** Number of items to load. */
7
+ limit?: number | null;
8
+ /** Number of items to skip in the current sort order. */
9
+ offset?: number | null;
10
+ }
11
+ interface CreateAccountRequest$1 {
12
+ /** The user to create under the new account, with the roles defined in `roles`. */
13
+ user: User$1;
14
+ /**
15
+ * Roles to be assigned to the user in the new account. To retrieve all available roles, call Get Roles Info in the Users API.
16
+ * Default: OWNER.
17
+ */
18
+ roles?: string[] | null;
19
+ }
20
+ /** A User to be created under an implicitly provided accountId: must have a unique email. */
21
+ interface User$1 {
22
+ /** User's unique email address details. Required. */
23
+ email?: Email$1;
24
+ /** User's single sign on identity, when the user is identified via SSO authentication response token params, as specified by [OpenID Connect](https://openid.net/developers/how-connect-works/) (aka. OIDC) protocol. */
25
+ ssoIdentities?: SsoIdentity$1[];
26
+ /** Additional user details. */
27
+ userDetails?: UserDetails$1;
28
+ }
29
+ /** User's email address. */
30
+ interface Email$1 {
31
+ /** User's email address. */
32
+ emailAddress?: string;
33
+ /** Whether the caller has verified the user's email address. */
34
+ isVerified?: boolean;
35
+ }
36
+ /** Single Sign On (aka. SSO) identity; user is identified via SSO authentication response token params, as specified by OpenID Connect (aka. OIDC) protocol */
37
+ interface SsoIdentity$1 {
38
+ /** An SSO setting (URLs, clientId, secret, etc. as required by OIDC protocol) for a specific Identity-Provider (aka. IdP) for a specific Wix account. */
39
+ ssoId?: string;
40
+ /**
41
+ * User ID as stored in IdP. For example a "sub" claim of OIDC protocol,
42
+ * or any other alternative, specified by IdP (Identity Provider).
43
+ */
44
+ userId?: string;
45
+ }
46
+ /** additional user details */
47
+ interface UserDetails$1 {
48
+ /** User's first name. */
49
+ firstName?: string | null;
50
+ /** User's last name. */
51
+ lastName?: string | null;
52
+ /** URL to location of user's profile picture. */
53
+ profilePictureUrl?: string | null;
54
+ /** User's preferred language in [ISO 639-1:2002](https://en.wikipedia.org/wiki/ISO_639-1) format. For example, "en", "es". */
55
+ language?: string | null;
56
+ /**
57
+ * Original Client IP from which a request was made.
58
+ * This is useful in case where a createUser API is called by some server call, which, in turn, has been called by some client from another IP.
59
+ * Wix checks this IP against the [OFAC sanctioned countries](https://ofac.treasury.gov/sanctions-programs-and-country-information).
60
+ */
61
+ clientIp?: string | null;
62
+ }
63
+ interface CreateAccountResponse$1 {
64
+ /** The created account. */
65
+ account?: AccountV2$1;
66
+ }
67
+ interface PagingMetadata$1 {
68
+ /** Number of items returned in the response. */
69
+ count?: number | null;
70
+ /** Offset that was requested. */
71
+ offset?: number | null;
72
+ /** Total number of items that match the query. */
73
+ total?: number | null;
74
+ /** Flag that indicates the server failed to calculate the `total` field. */
75
+ tooManyToCount?: boolean | null;
76
+ }
77
+ interface ListChildAccountsRequest$1 {
78
+ /**
79
+ * Paging options to limit and offset the number of items.
80
+ * Default: 20. Max: 50.
81
+ */
82
+ paging?: Paging$1;
83
+ }
84
+ interface ListChildAccountsResponse$1 {
85
+ /** The requested child accounts. */
86
+ childAccounts?: AccountV2$1[];
87
+ /** Metadata of the response pagination. */
88
+ pagingMetadata?: PagingMetadata$1;
89
+ }
90
+ interface AccountV2NonNullableFields$1 {
91
+ accountId: string;
92
+ }
93
+ interface CreateAccountResponseNonNullableFields$1 {
94
+ account?: AccountV2NonNullableFields$1;
95
+ }
96
+ interface ListChildAccountsResponseNonNullableFields$1 {
97
+ childAccounts: AccountV2NonNullableFields$1[];
98
+ }
99
+
100
+ interface AccountV2 {
101
+ /** Account ID. */
102
+ accountId?: string;
103
+ }
104
+ interface Paging {
105
+ /** Number of items to load. */
106
+ limit?: number | null;
107
+ /** Number of items to skip in the current sort order. */
108
+ offset?: number | null;
109
+ }
110
+ interface CreateAccountRequest {
111
+ /** The user to create under the new account, with the roles defined in `roles`. */
112
+ user: User;
113
+ /**
114
+ * Roles to be assigned to the user in the new account. To retrieve all available roles, call Get Roles Info in the Users API.
115
+ * Default: OWNER.
116
+ */
117
+ roles?: string[] | null;
118
+ }
119
+ /** A User to be created under an implicitly provided accountId: must have a unique email. */
120
+ interface User {
121
+ /** User's unique email address details. Required. */
122
+ email?: Email;
123
+ /** User's single sign on identity, when the user is identified via SSO authentication response token params, as specified by [OpenID Connect](https://openid.net/developers/how-connect-works/) (aka. OIDC) protocol. */
124
+ ssoIdentities?: SsoIdentity[];
125
+ /** Additional user details. */
126
+ userDetails?: UserDetails;
127
+ }
128
+ /** User's email address. */
129
+ interface Email {
130
+ /** User's email address. */
131
+ emailAddress?: string;
132
+ /** Whether the caller has verified the user's email address. */
133
+ isVerified?: boolean;
134
+ }
135
+ /** Single Sign On (aka. SSO) identity; user is identified via SSO authentication response token params, as specified by OpenID Connect (aka. OIDC) protocol */
136
+ interface SsoIdentity {
137
+ /** An SSO setting (URLs, clientId, secret, etc. as required by OIDC protocol) for a specific Identity-Provider (aka. IdP) for a specific Wix account. */
138
+ ssoId?: string;
139
+ /**
140
+ * User ID as stored in IdP. For example a "sub" claim of OIDC protocol,
141
+ * or any other alternative, specified by IdP (Identity Provider).
142
+ */
143
+ userId?: string;
144
+ }
145
+ /** additional user details */
146
+ interface UserDetails {
147
+ /** User's first name. */
148
+ firstName?: string | null;
149
+ /** User's last name. */
150
+ lastName?: string | null;
151
+ /** URL to location of user's profile picture. */
152
+ profilePictureUrl?: string | null;
153
+ /** User's preferred language in [ISO 639-1:2002](https://en.wikipedia.org/wiki/ISO_639-1) format. For example, "en", "es". */
154
+ language?: string | null;
155
+ /**
156
+ * Original Client IP from which a request was made.
157
+ * This is useful in case where a createUser API is called by some server call, which, in turn, has been called by some client from another IP.
158
+ * Wix checks this IP against the [OFAC sanctioned countries](https://ofac.treasury.gov/sanctions-programs-and-country-information).
159
+ */
160
+ clientIp?: string | null;
161
+ }
162
+ interface CreateAccountResponse {
163
+ /** The created account. */
164
+ account?: AccountV2;
165
+ }
166
+ interface PagingMetadata {
167
+ /** Number of items returned in the response. */
168
+ count?: number | null;
169
+ /** Offset that was requested. */
170
+ offset?: number | null;
171
+ /** Total number of items that match the query. */
172
+ total?: number | null;
173
+ /** Flag that indicates the server failed to calculate the `total` field. */
174
+ tooManyToCount?: boolean | null;
175
+ }
176
+ interface ListChildAccountsRequest {
177
+ /**
178
+ * Paging options to limit and offset the number of items.
179
+ * Default: 20. Max: 50.
180
+ */
181
+ paging?: Paging;
182
+ }
183
+ interface ListChildAccountsResponse {
184
+ /** The requested child accounts. */
185
+ childAccounts?: AccountV2[];
186
+ /** Metadata of the response pagination. */
187
+ pagingMetadata?: PagingMetadata;
188
+ }
189
+ interface AccountV2NonNullableFields {
190
+ accountId: string;
191
+ }
192
+ interface CreateAccountResponseNonNullableFields {
193
+ account?: AccountV2NonNullableFields;
194
+ }
195
+ interface ListChildAccountsResponseNonNullableFields {
196
+ childAccounts: AccountV2NonNullableFields[];
197
+ }
198
+
199
+ type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
200
+ getUrl: (context: any) => string;
201
+ httpMethod: K;
202
+ path: string;
203
+ pathParams: M;
204
+ __requestType: T;
205
+ __originalRequestType: S;
206
+ __responseType: Q;
207
+ __originalResponseType: R;
208
+ };
209
+ declare function createAccount(): __PublicMethodMetaInfo<'POST', {}, CreateAccountRequest, CreateAccountRequest$1, CreateAccountResponse & CreateAccountResponseNonNullableFields, CreateAccountResponse$1 & CreateAccountResponseNonNullableFields$1>;
210
+ declare function listChildAccounts(): __PublicMethodMetaInfo<'GET', {}, ListChildAccountsRequest, ListChildAccountsRequest$1, ListChildAccountsResponse & ListChildAccountsResponseNonNullableFields, ListChildAccountsResponse$1 & ListChildAccountsResponseNonNullableFields$1>;
211
+
212
+ type meta___PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = __PublicMethodMetaInfo<K, M, T, S, Q, R>;
213
+ declare const meta_createAccount: typeof createAccount;
214
+ declare const meta_listChildAccounts: typeof listChildAccounts;
215
+ declare namespace meta {
216
+ export { type meta___PublicMethodMetaInfo as __PublicMethodMetaInfo, meta_createAccount as createAccount, meta_listChildAccounts as listChildAccounts };
217
+ }
218
+
219
+ export { meta as accounts };