@asgardeo/javascript 0.10.1 → 0.10.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.
@@ -25,12 +25,12 @@ import { FlowMetadataResponse, GetFlowMetaRequestConfig } from '../../models/v2/
25
25
  * - i18n translations filtered by `language` and `namespace`
26
26
  * - Registration flow enablement status
27
27
  *
28
- * @param config - Request configuration including `baseUrl`/`url`, `type`, `id`,
29
- * and optional `language` / `namespace` filters.
28
+ * @param config - Request configuration including `baseUrl`/`url`, and optional
29
+ * `type`, `id`, `language`, and `namespace` filters. When `type`
30
+ * and `id` are omitted the server returns i18n-only metadata.
30
31
  * @returns A promise that resolves to the {@link FlowMetadataResponse}.
31
32
  *
32
- * @throws {AsgardeoAPIError} When required parameters are missing or the server
33
- * returns a non-OK response.
33
+ * @throws {AsgardeoAPIError} When the server returns a non-OK response.
34
34
  *
35
35
  * @example
36
36
  * ```typescript
package/dist/cjs/index.js CHANGED
@@ -3356,27 +3356,9 @@ var getFlowMetaV2 = async ({
3356
3356
  namespace,
3357
3357
  ...requestConfig
3358
3358
  }) => {
3359
- if (!type) {
3360
- throw new AsgardeoAPIError(
3361
- 'The "type" parameter is required',
3362
- "getFlowMetaV2-ValidationError-001",
3363
- "javascript",
3364
- 400,
3365
- 'The "type" query parameter must be either "APP" or "OU".'
3366
- );
3367
- }
3368
- if (!id) {
3369
- throw new AsgardeoAPIError(
3370
- 'The "id" parameter is required',
3371
- "getFlowMetaV2-ValidationError-002",
3372
- "javascript",
3373
- 400,
3374
- 'The "id" query parameter must be a valid UUID of the target application or organization unit.'
3375
- );
3376
- }
3377
3359
  const queryParams = new URLSearchParams({
3378
- id,
3379
- type,
3360
+ ...id ? { id } : {},
3361
+ ...type ? { type } : {},
3380
3362
  ...language ? { language } : {},
3381
3363
  ...namespace ? { namespace } : {}
3382
3364
  });