@asgardeo/javascript 0.1.0 → 0.1.2

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 (47) hide show
  1. package/dist/AsgardeoJavaScriptClient.d.ts +19 -52
  2. package/dist/IsomorphicCrypto.d.ts +2 -2
  3. package/dist/StorageManager.d.ts +1 -1
  4. package/dist/__legacy__/client.d.ts +2 -2
  5. package/dist/__legacy__/helpers/authentication-helper.d.ts +3 -3
  6. package/dist/api/createOrganization.d.ts +129 -0
  7. package/dist/api/executeEmbeddedSignInFlow.d.ts +21 -0
  8. package/dist/api/executeEmbeddedSignUpFlow.d.ts +44 -0
  9. package/dist/api/getAllOrganizations.d.ts +112 -0
  10. package/dist/api/getBrandingPreference.d.ts +103 -0
  11. package/dist/api/getMeOrganizations.d.ts +119 -0
  12. package/dist/api/getOrganization.d.ts +109 -0
  13. package/dist/api/getSchemas.d.ts +89 -0
  14. package/dist/api/getScim2Me.d.ts +89 -0
  15. package/dist/api/initializeEmbeddedSignInFlow.d.ts +51 -0
  16. package/dist/api/updateMeProfile.d.ts +82 -0
  17. package/dist/api/updateOrganization.d.ts +118 -0
  18. package/dist/cjs/index.js +1100 -157
  19. package/dist/cjs/index.js.map +4 -4
  20. package/dist/constants/OIDCRequestConstants.d.ts +1 -1
  21. package/dist/constants/ScopeConstants.d.ts +3 -6
  22. package/dist/constants/TokenExchangeConstants.d.ts +2 -2
  23. package/dist/constants/VendorConstants.d.ts +31 -0
  24. package/dist/index.d.ts +24 -6
  25. package/dist/index.js +1071 -148
  26. package/dist/index.js.map +4 -4
  27. package/dist/models/branding-preference.d.ts +248 -0
  28. package/dist/models/client.d.ts +55 -5
  29. package/dist/models/config.d.ts +54 -12
  30. package/dist/models/embedded-flow.d.ts +66 -0
  31. package/dist/models/embedded-signin-flow.d.ts +99 -0
  32. package/dist/models/flow.d.ts +30 -0
  33. package/dist/models/i18n.d.ts +24 -0
  34. package/dist/models/organization.d.ts +24 -0
  35. package/dist/models/token.d.ts +42 -30
  36. package/dist/theme/createTheme.d.ts +1 -1
  37. package/dist/theme/types.d.ts +42 -17
  38. package/dist/utils/deriveOrganizationHandleFromBaseUrl.d.ts +47 -0
  39. package/dist/utils/extractTenantDomainFromIdTokenPayload.d.ts +2 -2
  40. package/dist/utils/extractUserClaimsFromIdToken.d.ts +2 -2
  41. package/dist/utils/generateFlattenedUserProfile.d.ts +9 -2
  42. package/dist/utils/isEmpty.d.ts +48 -0
  43. package/dist/utils/withVendorCSSClassPrefix.d.ts +32 -0
  44. package/package.json +1 -1
  45. package/dist/api/handleApplicationNativeAuthentication.d.ts +0 -33
  46. package/dist/api/initializeApplicationNativeAuthentication.d.ts +0 -117
  47. package/dist/models/application-native-authentication.d.ts +0 -82
@@ -0,0 +1,109 @@
1
+ /**
2
+ * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
3
+ *
4
+ * WSO2 LLC. licenses this file to you under the Apache License,
5
+ * Version 2.0 (the "License"); you may not use this file except
6
+ * in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing,
12
+ * software distributed under the License is distributed on an
13
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ * KIND, either express or implied. See the License for the
15
+ * specific language governing permissions and limitations
16
+ * under the License.
17
+ */
18
+ /**
19
+ * Extended organization interface with additional properties
20
+ */
21
+ export interface OrganizationDetails {
22
+ attributes?: Record<string, any>;
23
+ created?: string;
24
+ description?: string;
25
+ id: string;
26
+ lastModified?: string;
27
+ name: string;
28
+ orgHandle: string;
29
+ parent?: {
30
+ id: string;
31
+ ref: string;
32
+ };
33
+ permissions?: string[];
34
+ status?: string;
35
+ type?: string;
36
+ }
37
+ /**
38
+ * Configuration for the getOrganization request
39
+ */
40
+ export interface GetOrganizationConfig extends Omit<RequestInit, 'method'> {
41
+ /**
42
+ * The base URL for the API endpoint.
43
+ */
44
+ baseUrl: string;
45
+ /**
46
+ * The ID of the organization to retrieve
47
+ */
48
+ organizationId: string;
49
+ /**
50
+ * Optional custom fetcher function.
51
+ * If not provided, native fetch will be used
52
+ */
53
+ fetcher?: (url: string, config: RequestInit) => Promise<Response>;
54
+ }
55
+ /**
56
+ * Retrieves detailed information for a specific organization.
57
+ *
58
+ * @param config - Configuration object containing baseUrl, organizationId, and request config.
59
+ * @returns A promise that resolves with the organization details.
60
+ * @example
61
+ * ```typescript
62
+ * // Using default fetch
63
+ * try {
64
+ * const organization = await getOrganization({
65
+ * baseUrl: "https://api.asgardeo.io/t/dxlab",
66
+ * organizationId: "0d5e071b-d3d3-475d-b3c6-1a20ee2fa9b1"
67
+ * });
68
+ * console.log(organization);
69
+ * } catch (error) {
70
+ * if (error instanceof AsgardeoAPIError) {
71
+ * console.error('Failed to get organization:', error.message);
72
+ * }
73
+ * }
74
+ * ```
75
+ *
76
+ * @example
77
+ * ```typescript
78
+ * // Using custom fetcher (e.g., axios-based httpClient)
79
+ * try {
80
+ * const organization = await getOrganization({
81
+ * baseUrl: "https://api.asgardeo.io/t/dxlab",
82
+ * organizationId: "0d5e071b-d3d3-475d-b3c6-1a20ee2fa9b1",
83
+ * fetcher: async (url, config) => {
84
+ * const response = await httpClient({
85
+ * url,
86
+ * method: config.method,
87
+ * headers: config.headers,
88
+ * ...config
89
+ * });
90
+ * // Convert axios-like response to fetch-like Response
91
+ * return {
92
+ * ok: response.status >= 200 && response.status < 300,
93
+ * status: response.status,
94
+ * statusText: response.statusText,
95
+ * json: () => Promise.resolve(response.data),
96
+ * text: () => Promise.resolve(typeof response.data === 'string' ? response.data : JSON.stringify(response.data))
97
+ * } as Response;
98
+ * }
99
+ * });
100
+ * console.log(organization);
101
+ * } catch (error) {
102
+ * if (error instanceof AsgardeoAPIError) {
103
+ * console.error('Failed to get organization:', error.message);
104
+ * }
105
+ * }
106
+ * ```
107
+ */
108
+ declare const getOrganization: ({ baseUrl, organizationId, fetcher, ...requestConfig }: GetOrganizationConfig) => Promise<OrganizationDetails>;
109
+ export default getOrganization;
@@ -0,0 +1,89 @@
1
+ /**
2
+ * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
3
+ *
4
+ * WSO2 LLC. licenses this file to you under the Apache License,
5
+ * Version 2.0 (the "License"); you may not use this file except
6
+ * in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing,
12
+ * software distributed under the License is distributed on an
13
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ * KIND, either express or implied. See the License for the
15
+ * specific language governing permissions and limitations
16
+ * under the License.
17
+ */
18
+ import { Schema } from '../models/scim2-schema';
19
+ /**
20
+ * Configuration for the getSchemas request
21
+ */
22
+ export interface GetSchemasConfig extends Omit<RequestInit, 'method'> {
23
+ /**
24
+ * The absolute API endpoint.
25
+ */
26
+ url?: string;
27
+ /**
28
+ * The base path of the API endpoint.
29
+ */
30
+ baseUrl?: string;
31
+ /**
32
+ * Optional custom fetcher function.
33
+ * If not provided, native fetch will be used
34
+ */
35
+ fetcher?: (url: string, config: RequestInit) => Promise<Response>;
36
+ }
37
+ /**
38
+ * Retrieves the SCIM2 schemas from the specified endpoint.
39
+ *
40
+ * @param config - Request configuration object.
41
+ * @returns A promise that resolves with the SCIM2 schemas information.
42
+ * @example
43
+ * ```typescript
44
+ * // Using default fetch
45
+ * try {
46
+ * const schemas = await getSchemas({
47
+ * url: "https://api.asgardeo.io/t/<ORGANIZATION>/scim2/Schemas",
48
+ * });
49
+ * console.log(schemas);
50
+ * } catch (error) {
51
+ * if (error instanceof AsgardeoAPIError) {
52
+ * console.error('Failed to get schemas:', error.message);
53
+ * }
54
+ * }
55
+ * ```
56
+ *
57
+ * @example
58
+ * ```typescript
59
+ * // Using custom fetcher (e.g., axios-based httpClient)
60
+ * try {
61
+ * const schemas = await getSchemas({
62
+ * url: "https://api.asgardeo.io/t/<ORGANIZATION>/scim2/Schemas",
63
+ * fetcher: async (url, config) => {
64
+ * const response = await httpClient({
65
+ * url,
66
+ * method: config.method,
67
+ * headers: config.headers,
68
+ * ...config
69
+ * });
70
+ * // Convert axios-like response to fetch-like Response
71
+ * return {
72
+ * ok: response.status >= 200 && response.status < 300,
73
+ * status: response.status,
74
+ * statusText: response.statusText,
75
+ * json: () => Promise.resolve(response.data),
76
+ * text: () => Promise.resolve(typeof response.data === 'string' ? response.data : JSON.stringify(response.data))
77
+ * } as Response;
78
+ * }
79
+ * });
80
+ * console.log(schemas);
81
+ * } catch (error) {
82
+ * if (error instanceof AsgardeoAPIError) {
83
+ * console.error('Failed to get schemas:', error.message);
84
+ * }
85
+ * }
86
+ * ```
87
+ */
88
+ declare const getSchemas: ({ url, baseUrl, fetcher, ...requestConfig }: GetSchemasConfig) => Promise<Schema[]>;
89
+ export default getSchemas;
@@ -0,0 +1,89 @@
1
+ /**
2
+ * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
3
+ *
4
+ * WSO2 LLC. licenses this file to you under the Apache License,
5
+ * Version 2.0 (the "License"); you may not use this file except
6
+ * in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing,
12
+ * software distributed under the License is distributed on an
13
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ * KIND, either express or implied. See the License for the
15
+ * specific language governing permissions and limitations
16
+ * under the License.
17
+ */
18
+ import { User } from '../models/user';
19
+ /**
20
+ * Configuration for the getScim2Me request
21
+ */
22
+ export interface GetScim2MeConfig extends Omit<RequestInit, 'method'> {
23
+ /**
24
+ * The absolute API endpoint.
25
+ */
26
+ url?: string;
27
+ /**
28
+ * The base path of the API endpoint.
29
+ */
30
+ baseUrl?: string;
31
+ /**
32
+ * Optional custom fetcher function.
33
+ * If not provided, native fetch will be used
34
+ */
35
+ fetcher?: (url: string, config: RequestInit) => Promise<Response>;
36
+ }
37
+ /**
38
+ * Retrieves the user profile information from the specified SCIM2 /Me endpoint.
39
+ *
40
+ * @param config - Request configuration object.
41
+ * @returns A promise that resolves with the user profile information.
42
+ * @example
43
+ * ```typescript
44
+ * // Using default fetch
45
+ * try {
46
+ * const userProfile = await getScim2Me({
47
+ * url: "https://api.asgardeo.io/t/<ORGANIZATION>/scim2/Me",
48
+ * });
49
+ * console.log(userProfile);
50
+ * } catch (error) {
51
+ * if (error instanceof AsgardeoAPIError) {
52
+ * console.error('Failed to get user profile:', error.message);
53
+ * }
54
+ * }
55
+ * ```
56
+ *
57
+ * @example
58
+ * ```typescript
59
+ * // Using custom fetcher (e.g., axios-based httpClient)
60
+ * try {
61
+ * const userProfile = await getScim2Me({
62
+ * url: "https://api.asgardeo.io/t/<ORGANIZATION>/scim2/Me",
63
+ * fetcher: async (url, config) => {
64
+ * const response = await httpClient({
65
+ * url,
66
+ * method: config.method,
67
+ * headers: config.headers,
68
+ * ...config
69
+ * });
70
+ * // Convert axios-like response to fetch-like Response
71
+ * return {
72
+ * ok: response.status >= 200 && response.status < 300,
73
+ * status: response.status,
74
+ * statusText: response.statusText,
75
+ * json: () => Promise.resolve(response.data),
76
+ * text: () => Promise.resolve(typeof response.data === 'string' ? response.data : JSON.stringify(response.data))
77
+ * } as Response;
78
+ * }
79
+ * });
80
+ * console.log(userProfile);
81
+ * } catch (error) {
82
+ * if (error instanceof AsgardeoAPIError) {
83
+ * console.error('Failed to get user profile:', error.message);
84
+ * }
85
+ * }
86
+ * ```
87
+ */
88
+ declare const getScim2Me: ({ url, baseUrl, fetcher, ...requestConfig }: GetScim2MeConfig) => Promise<User>;
89
+ export default getScim2Me;
@@ -0,0 +1,51 @@
1
+ /**
2
+ * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
3
+ *
4
+ * WSO2 LLC. licenses this file to you under the Apache License,
5
+ * Version 2.0 (the "License"); you may not use this file except
6
+ * in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing,
12
+ * software distributed under the License is distributed on an
13
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ * KIND, either express or implied. See the License for the
15
+ * specific language governing permissions and limitations
16
+ * under the License.
17
+ */
18
+ import { EmbeddedFlowExecuteRequestConfig } from '../models/embedded-flow';
19
+ import { EmbeddedSignInFlowInitiateResponse } from '../models/embedded-signin-flow';
20
+ /**
21
+ * Sends an authorization request to the specified OAuth2/OIDC authorization endpoint.
22
+ *
23
+ * @param requestConfig - Request configuration object containing URL and payload.
24
+ * @returns A promise that resolves with the authorization response.
25
+ * @throws AsgardeoAPIError when the request fails or URL is invalid.
26
+ *
27
+ * @example
28
+ * ```typescript
29
+ * try {
30
+ * const authResponse = await initializeEmbeddedSignInFlow({
31
+ * url: "https://api.asgardeo.io/t/<ORGANIZATION>/oauth2/authorize",
32
+ * payload: {
33
+ * response_type: "code",
34
+ * client_id: "your-client-id",
35
+ * redirect_uri: "https://your-app.com/callback",
36
+ * scope: "openid profile email",
37
+ * state: "random-state-value",
38
+ * code_challenge: "your-pkce-challenge",
39
+ * code_challenge_method: "S256"
40
+ * }
41
+ * });
42
+ * console.log(authResponse);
43
+ * } catch (error) {
44
+ * if (error instanceof AsgardeoAPIError) {
45
+ * console.error('Authorization failed:', error.message);
46
+ * }
47
+ * }
48
+ * ```
49
+ */
50
+ declare const initializeEmbeddedSignInFlow: ({ url, baseUrl, payload, ...requestConfig }: EmbeddedFlowExecuteRequestConfig) => Promise<EmbeddedSignInFlowInitiateResponse>;
51
+ export default initializeEmbeddedSignInFlow;
@@ -0,0 +1,82 @@
1
+ /**
2
+ * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
3
+ *
4
+ * WSO2 LLC. licenses this file to you under the Apache License,
5
+ * Version 2.0 (the "License"); you may not use this file except
6
+ * in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing,
12
+ * software distributed under the License is distributed on an
13
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ * KIND, either express or implied. See the License for the
15
+ * specific language governing permissions and limitations
16
+ * under the License.
17
+ */
18
+ import { User } from '../models/user';
19
+ /**
20
+ * Configuration for the updateMeProfile request
21
+ */
22
+ export interface UpdateMeProfileConfig extends Omit<RequestInit, 'method' | 'body'> {
23
+ /**
24
+ * The absolute API endpoint.
25
+ */
26
+ url?: string;
27
+ /**
28
+ * The base path of the API endpoint.
29
+ */
30
+ baseUrl?: string;
31
+ /**
32
+ * The value object to patch (SCIM2 PATCH value)
33
+ */
34
+ payload: any;
35
+ /**
36
+ * Optional custom fetcher function.
37
+ * If not provided, native fetch will be used
38
+ */
39
+ fetcher?: (url: string, config: RequestInit) => Promise<Response>;
40
+ }
41
+ /**
42
+ * Updates the user profile information at the specified SCIM2 Me endpoint.
43
+ *
44
+ * @param config - Configuration object with URL, payload and optional request config.
45
+ * @returns A promise that resolves with the updated user profile information.
46
+ * @example
47
+ * ```typescript
48
+ * // Using default fetch
49
+ * await updateMeProfile({
50
+ * url: "https://api.asgardeo.io/t/<ORG>/scim2/Me",
51
+ * payload: { "urn:scim:wso2:schema": { mobileNumbers: ["0777933830"] } }
52
+ * });
53
+ * ```
54
+ *
55
+ * @example
56
+ * ```typescript
57
+ * // Using custom fetcher (e.g., axios-based httpClient)
58
+ * await updateMeProfile({
59
+ * url: "https://api.asgardeo.io/t/<ORG>/scim2/Me",
60
+ * payload: { "urn:scim:wso2:schema": { mobileNumbers: ["0777933830"] } },
61
+ * fetcher: async (url, config) => {
62
+ * const response = await httpClient({
63
+ * url,
64
+ * method: config.method,
65
+ * headers: config.headers,
66
+ * data: config.body,
67
+ * ...config
68
+ * });
69
+ * // Convert axios-like response to fetch-like Response
70
+ * return {
71
+ * ok: response.status >= 200 && response.status < 300,
72
+ * status: response.status,
73
+ * statusText: response.statusText,
74
+ * json: () => Promise.resolve(response.data),
75
+ * text: () => Promise.resolve(typeof response.data === 'string' ? response.data : JSON.stringify(response.data))
76
+ * } as Response;
77
+ * }
78
+ * });
79
+ * ```
80
+ */
81
+ declare const updateMeProfile: ({ url, baseUrl, payload, fetcher, ...requestConfig }: UpdateMeProfileConfig) => Promise<User>;
82
+ export default updateMeProfile;
@@ -0,0 +1,118 @@
1
+ /**
2
+ * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
3
+ *
4
+ * WSO2 LLC. licenses this file to you under the Apache License,
5
+ * Version 2.0 (the "License"); you may not use this file except
6
+ * in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing,
12
+ * software distributed under the License is distributed on an
13
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ * KIND, either express or implied. See the License for the
15
+ * specific language governing permissions and limitations
16
+ * under the License.
17
+ */
18
+ import { OrganizationDetails } from './getOrganization';
19
+ /**
20
+ * Configuration for the updateOrganization request
21
+ */
22
+ export interface UpdateOrganizationConfig extends Omit<RequestInit, 'method' | 'body'> {
23
+ /**
24
+ * The base URL for the API endpoint.
25
+ */
26
+ baseUrl: string;
27
+ /**
28
+ * The ID of the organization to update
29
+ */
30
+ organizationId: string;
31
+ /**
32
+ * Array of patch operations to apply
33
+ */
34
+ operations: Array<{
35
+ operation: 'REPLACE' | 'ADD' | 'REMOVE';
36
+ path: string;
37
+ value?: any;
38
+ }>;
39
+ /**
40
+ * Optional custom fetcher function.
41
+ * If not provided, native fetch will be used
42
+ */
43
+ fetcher?: (url: string, config: RequestInit) => Promise<Response>;
44
+ }
45
+ /**
46
+ * Updates the organization information using the Organizations Management API.
47
+ *
48
+ * @param config - Configuration object with baseUrl, organizationId, operations and optional request config.
49
+ * @returns A promise that resolves with the updated organization information.
50
+ * @example
51
+ * ```typescript
52
+ * // Using the helper function to create operations automatically
53
+ * const operations = createPatchOperations({
54
+ * name: "Updated Organization Name", // Will use REPLACE
55
+ * description: "", // Will use REMOVE (empty string)
56
+ * customField: "Some value" // Will use REPLACE
57
+ * });
58
+ *
59
+ * await updateOrganization({
60
+ * baseUrl: "https://api.asgardeo.io/t/<ORG>",
61
+ * organizationId: "0d5e071b-d3d3-475d-b3c6-1a20ee2fa9b1",
62
+ * operations
63
+ * });
64
+ *
65
+ * // Or manually specify operations
66
+ * await updateOrganization({
67
+ * baseUrl: "https://api.asgardeo.io/t/<ORG>",
68
+ * organizationId: "0d5e071b-d3d3-475d-b3c6-1a20ee2fa9b1",
69
+ * operations: [
70
+ * { operation: "REPLACE", path: "/name", value: "Updated Organization Name" },
71
+ * { operation: "REMOVE", path: "/description" }
72
+ * ]
73
+ * });
74
+ * ```
75
+ *
76
+ * @example
77
+ * ```typescript
78
+ * // Using custom fetcher (e.g., axios-based httpClient)
79
+ * await updateOrganization({
80
+ * baseUrl: "https://api.asgardeo.io/t/<ORG>",
81
+ * organizationId: "0d5e071b-d3d3-475d-b3c6-1a20ee2fa9b1",
82
+ * operations: [
83
+ * { operation: "REPLACE", path: "/name", value: "Updated Organization Name" }
84
+ * ],
85
+ * fetcher: async (url, config) => {
86
+ * const response = await httpClient({
87
+ * url,
88
+ * method: config.method,
89
+ * headers: config.headers,
90
+ * data: config.body,
91
+ * ...config
92
+ * });
93
+ * // Convert axios-like response to fetch-like Response
94
+ * return {
95
+ * ok: response.status >= 200 && response.status < 300,
96
+ * status: response.status,
97
+ * statusText: response.statusText,
98
+ * json: () => Promise.resolve(response.data),
99
+ * text: () => Promise.resolve(typeof response.data === 'string' ? response.data : JSON.stringify(response.data))
100
+ * } as Response;
101
+ * }
102
+ * });
103
+ * ```
104
+ */
105
+ declare const updateOrganization: ({ baseUrl, organizationId, operations, fetcher, ...requestConfig }: UpdateOrganizationConfig) => Promise<OrganizationDetails>;
106
+ /**
107
+ * Helper function to convert field updates to patch operations format.
108
+ * Uses REMOVE operation when the value is empty, otherwise uses REPLACE.
109
+ *
110
+ * @param payload - Object containing field updates
111
+ * @returns Array of patch operations
112
+ */
113
+ export declare const createPatchOperations: (payload: Record<string, any>) => Array<{
114
+ operation: "REPLACE" | "REMOVE";
115
+ path: string;
116
+ value?: any;
117
+ }>;
118
+ export default updateOrganization;