From 2e8be4bc2603f9d89351fc9d32c46adb035ddf7f Mon Sep 17 00:00:00 2001 From: bodrovis Date: Mon, 25 Mar 2024 16:51:07 +0200 Subject: [PATCH] rework types, closes #443 --- dist/collections/base_collection.d.ts | 2 +- dist/collections/branches.d.ts | 17 +- dist/collections/branches.js.map | 2 +- dist/collections/comments.d.ts | 21 +- dist/collections/comments.js.map | 2 +- dist/collections/contributors.d.ts | 12 +- dist/collections/contributors.js.map | 2 +- dist/collections/files.d.ts | 15 +- dist/collections/files.js.map | 2 +- dist/collections/keys.d.ts | 21 +- dist/collections/keys.js.map | 2 +- dist/collections/languages.d.ts | 13 +- dist/collections/languages.js.map | 2 +- dist/collections/orders.d.ts | 6 +- dist/collections/payment_cards.d.ts | 9 +- dist/collections/payment_cards.js.map | 2 +- dist/collections/projects.d.ts | 19 +- dist/collections/projects.js.map | 2 +- dist/collections/queued_processes.d.ts | 3 +- dist/collections/queued_processes.js.map | 2 +- dist/collections/screenshots.d.ts | 12 +- dist/collections/screenshots.js.map | 2 +- dist/collections/segments.d.ts | 21 +- dist/collections/segments.js.map | 2 +- dist/collections/snapshots.d.ts | 11 +- dist/collections/snapshots.js.map | 2 +- dist/collections/tasks.d.ts | 16 +- dist/collections/tasks.js.map | 2 +- .../team_user_billing_details.d.ts | 4 +- dist/collections/team_users.d.ts | 11 +- dist/collections/team_users.js.map | 2 +- dist/collections/teams.d.ts | 2 +- dist/collections/translation_providers.d.ts | 4 +- dist/collections/translation_statuses.d.ts | 15 +- dist/collections/translation_statuses.js.map | 2 +- dist/collections/translations.d.ts | 18 +- dist/collections/translations.js.map | 2 +- dist/collections/user_groups.d.ts | 11 +- dist/collections/user_groups.js.map | 2 +- dist/collections/webhooks.d.ts | 15 +- dist/collections/webhooks.js.map | 2 +- dist/http_client/base.d.ts | 2 +- dist/interfaces/index.d.ts | 26 +- dist/interfaces/ota/ota_api_error.d.ts | 5 + dist/interfaces/ota/ota_api_error.js | 2 + dist/interfaces/ota/ota_api_error.js.map | 1 + dist/interfaces/ota/ota_bundle.d.ts | 15 + dist/interfaces/ota/ota_bundle.js | 2 + dist/interfaces/ota/ota_bundle.js.map | 1 + dist/interfaces/ota/ota_bundle_archive.d.ts | 4 + dist/interfaces/ota/ota_bundle_archive.js | 2 + dist/interfaces/ota/ota_bundle_archive.js.map | 1 + dist/interfaces/ota/ota_freeze_period.d.ts | 8 + dist/interfaces/ota/ota_freeze_period.js | 2 + dist/interfaces/ota/ota_freeze_period.js.map | 1 + dist/interfaces/ota/ota_sdk_token.d.ts | 7 + dist/interfaces/ota/ota_sdk_token.js | 2 + dist/interfaces/ota/ota_sdk_token.js.map | 1 + dist/interfaces/ota/ota_statistics.d.ts | 25 ++ dist/interfaces/ota/ota_statistics.js | 2 + dist/interfaces/ota/ota_statistics.js.map | 1 + dist/main.d.ts | 2 +- dist/main.js | 1 - dist/main.js.map | 2 +- dist/models/ota/ota_api_error.d.ts | 7 + dist/models/ota/ota_api_error.js | 4 + dist/models/ota/ota_api_error.js.map | 1 + dist/models/ota/ota_bundle.d.ts | 17 + dist/models/ota/ota_bundle.js | 4 + dist/models/ota/ota_bundle.js.map | 1 + dist/models/ota/ota_bundle_archive.d.ts | 6 + dist/models/ota/ota_bundle_archive.js | 4 + dist/models/ota/ota_bundle_archive.js.map | 1 + dist/models/ota/ota_freeze_period.d.ts | 10 + dist/models/ota/ota_freeze_period.js | 4 + dist/models/ota/ota_freeze_period.js.map | 1 + dist/models/ota/ota_sdk_token.d.ts | 9 + dist/models/ota/ota_sdk_token.js | 4 + dist/models/ota/ota_sdk_token.js.map | 1 + dist/models/ota/ota_statistics.d.ts | 27 ++ dist/models/ota/ota_statistics.js | 4 + dist/models/ota/ota_statistics.js.map | 1 + dist/oauth2/auth_request.d.ts | 2 +- .../ota_bundle_management.d.ts | 11 +- dist/ota_collections/ota_bundle_management.js | 2 +- .../ota_bundle_management.js.map | 2 +- .../ota_bundle_publishing.d.ts | 2 +- dist/ota_collections/ota_bundles.d.ts | 15 +- dist/ota_collections/ota_bundles.js | 2 +- dist/ota_collections/ota_bundles.js.map | 2 +- dist/ota_collections/ota_freeze_periods.d.ts | 16 +- dist/ota_collections/ota_freeze_periods.js | 2 +- .../ota_collections/ota_freeze_periods.js.map | 2 +- dist/ota_collections/ota_sdk_tokens.d.ts | 5 +- dist/ota_collections/ota_sdk_tokens.js | 2 +- dist/ota_collections/ota_sdk_tokens.js.map | 2 +- .../ota_collections/ota_usage_statistics.d.ts | 10 +- dist/ota_collections/ota_usage_statistics.js | 2 +- .../ota_usage_statistics.js.map | 2 +- dist/types/billing_details.d.ts | 12 + dist/types/billing_details.js | 2 + dist/types/billing_details.js.map | 1 + dist/types/branches.d.ts | 18 + dist/types/branches.js | 2 + dist/types/branches.js.map | 1 + dist/types/cards.d.ts | 10 + dist/types/cards.js | 2 + dist/types/cards.js.map | 1 + dist/types/comments.d.ts | 15 + dist/types/comments.js | 2 + dist/types/comments.js.map | 1 + dist/types/common_get_params.d.ts | 11 + dist/types/common_get_params.js | 2 + dist/types/common_get_params.js.map | 1 + dist/types/contributors.d.ts | 24 ++ dist/types/contributors.js | 2 + dist/types/contributors.js.map | 1 + dist/types/files.d.ts | 92 +++++ dist/types/files.js | 2 + dist/types/files.js.map | 1 + dist/types/index.d.ts | 132 ++++--- dist/types/keys.d.ts | 70 ++++ dist/types/keys.js | 2 + dist/types/keys.js.map | 1 + dist/types/languages.d.ts | 16 + dist/types/languages.js | 2 + dist/types/languages.js.map | 1 + dist/types/orders.d.ts | 15 + dist/types/orders.js | 2 + dist/types/orders.js.map | 1 + dist/types/ota.d.ts | 33 ++ dist/types/ota.js | 2 + dist/types/ota.js.map | 1 + dist/types/projects.d.ts | 31 ++ dist/types/projects.js | 2 + dist/types/projects.js.map | 1 + dist/types/screenshots.d.ts | 20 ++ dist/types/screenshots.js | 2 + dist/types/screenshots.js.map | 1 + dist/types/segments.d.ts | 19 + dist/types/segments.js | 2 + dist/types/segments.js.map | 1 + dist/types/snapshots.d.ts | 8 + dist/types/snapshots.js | 2 + dist/types/snapshots.js.map | 1 + dist/types/tasks.d.ts | 38 ++ dist/types/tasks.js | 2 + dist/types/tasks.js.map | 1 + dist/types/team_users.d.ts | 7 + dist/types/team_users.js | 2 + dist/types/team_users.js.map | 1 + dist/types/teams.d.ts | 2 + dist/types/teams.js | 2 + dist/types/teams.js.map | 1 + dist/types/translation_statuses.d.ts | 16 + dist/types/translation_statuses.js | 2 + dist/types/translation_statuses.js.map | 1 + dist/types/translations.d.ts | 27 ++ dist/types/translations.js | 2 + dist/types/translations.js.map | 1 + dist/types/user_groups.d.ts | 17 + dist/types/user_groups.js | 2 + dist/types/user_groups.js.map | 1 + .../webhook_events/project_exported.d.ts | 2 +- .../webhook_events/project_key_added.d.ts | 2 +- .../project_key_comment_added.d.ts | 2 +- .../webhook_events/project_key_modified.d.ts | 2 +- .../webhook_events/project_keys_added.d.ts | 2 +- .../webhook_events/project_keys_deleted.d.ts | 2 +- .../webhook_events/project_keys_modified.d.ts | 2 +- .../project_translation_proofread.d.ts | 2 +- .../project_translation_updated.d.ts | 2 +- dist/types/webhooks.d.ts | 22 ++ dist/types/webhooks.js | 2 + dist/types/webhooks.js.map | 1 + docs/additional_info/changelog.md | 4 + package-lock.json | 331 +++++++++--------- package.json | 2 +- src/collections/base_collection.ts | 2 +- src/collections/branches.ts | 26 +- src/collections/comments.ts | 29 +- src/collections/contributors.ts | 19 +- src/collections/files.ts | 22 +- src/collections/keys.ts | 30 +- src/collections/languages.ts | 21 +- src/collections/orders.ts | 6 +- src/collections/payment_cards.ts | 9 +- src/collections/projects.ts | 27 +- src/collections/queued_processes.ts | 6 +- src/collections/screenshots.ts | 19 +- src/collections/segments.ts | 29 +- src/collections/snapshots.ts | 17 +- src/collections/tasks.ts | 22 +- src/collections/team_user_billing_details.ts | 4 +- src/collections/team_users.ts | 11 +- src/collections/teams.ts | 2 +- src/collections/translation_providers.ts | 4 +- src/collections/translation_statuses.ts | 24 +- src/collections/translations.ts | 23 +- src/collections/user_groups.ts | 14 +- src/collections/webhooks.ts | 24 +- src/http_client/base.ts | 2 +- src/interfaces/create_project_key_input.ts | 24 -- src/interfaces/get_key_params.ts | 6 - src/interfaces/index.ts | 27 +- src/interfaces/key_params_with_pagination.ts | 18 - src/interfaces/language_mapping.ts | 4 - src/interfaces/{ => ota}/ota_api_error.ts | 0 src/interfaces/{ => ota}/ota_bundle.ts | 0 .../{ => ota}/ota_bundle_archive.ts | 0 src/interfaces/{ => ota}/ota_freeze_period.ts | 0 src/interfaces/{ => ota}/ota_sdk_token.ts | 0 src/interfaces/{ => ota}/ota_statistics.ts | 0 src/interfaces/ota_framework.ts | 3 - src/interfaces/ota_team_project.ts | 4 - src/interfaces/ota_team_project_framework.ts | 4 - src/interfaces/pagination_params.ts | 4 - src/interfaces/project_only.ts | 3 - src/interfaces/project_with_pagination.ts | 4 - src/interfaces/team_only.ts | 3 - src/interfaces/team_with_pagination.ts | 4 - src/interfaces/upload_file_params.ts | 28 -- src/main.ts | 2 +- src/models/{ => ota}/ota_api_error.ts | 4 +- src/models/{ => ota}/ota_bundle.ts | 4 +- src/models/{ => ota}/ota_bundle_archive.ts | 4 +- src/models/{ => ota}/ota_freeze_period.ts | 4 +- src/models/{ => ota}/ota_sdk_token.ts | 4 +- src/models/{ => ota}/ota_statistics.ts | 4 +- src/oauth2/auth_request.ts | 2 +- src/ota_collections/ota_bundle_management.ts | 15 +- src/ota_collections/ota_bundle_publishing.ts | 2 +- src/ota_collections/ota_bundles.ts | 19 +- src/ota_collections/ota_freeze_periods.ts | 21 +- src/ota_collections/ota_sdk_tokens.ts | 5 +- src/ota_collections/ota_usage_statistics.ts | 10 +- ...g_details_params.ts => billing_details.ts} | 0 src/types/branch_params.ts | 3 - src/types/branches.ts | 22 ++ src/types/bulk_update_key_params.ts | 6 - src/types/{create_card_params.ts => cards.ts} | 5 + src/types/comment_data.ts | 3 - src/types/comments.ts | 22 ++ src/types/common_get_params.ts | 14 + src/types/contributor_create_data.ts | 11 - src/types/contributor_languages.ts | 4 - src/types/contributor_update_data.ts | 9 - src/types/contributors.ts | 28 ++ src/types/create_key_data.ts | 23 -- src/types/create_key_params.ts | 6 - src/types/create_language_params.ts | 6 - src/types/create_project_params.ts | 12 - src/types/create_screenshot_params.ts | 8 - src/types/create_snapshot_params.ts | 3 - src/types/create_task_params.ts | 18 - src/types/create_translation_status_params.ts | 4 - src/types/create_webhook_params.ts | 8 - src/types/download_bundle.ts | 5 - .../files.ts} | 51 ++- src/types/index.ts | 222 ++++++++---- src/types/keys.ts | 82 +++++ src/types/languages.ts | 18 + src/types/merge_branch_params.ts | 4 - .../{create_order_params.ts => orders.ts} | 0 src/types/ota.ts | 41 +++ src/types/ota_resource_deleted.ts | 4 - src/types/projects.ts | 36 ++ src/types/screenshot_data.ts | 6 - src/types/screenshots.ts | 26 ++ src/types/segments.ts | 25 ++ src/types/snapshots.ts | 9 + src/types/task_language.ts | 5 - src/types/tasks.ts | 53 +++ src/types/team_user_params.ts | 3 - src/types/team_users.ts | 8 + src/types/teams.ts | 3 + src/types/translation_data.ts | 9 - src/types/translation_statuses.ts | 19 + src/types/translations.ts | 34 ++ src/types/update_key_data.ts | 9 - src/types/update_key_data_with_id.ts | 5 - src/types/update_language_params.ts | 5 - src/types/update_project_params.ts | 4 - src/types/update_screenshot_params.ts | 6 - src/types/update_task_params.ts | 20 -- src/types/update_translation_params.ts | 6 - src/types/update_translation_status_params.ts | 4 - src/types/update_webhook_params.ts | 9 - .../{user_group_params.ts => user_groups.ts} | 7 +- src/types/webhook_event_lang_map.ts | 4 - src/types/webhook_events/project_exported.ts | 2 +- src/types/webhook_events/project_key_added.ts | 2 +- .../project_key_comment_added.ts | 2 +- .../webhook_events/project_key_modified.ts | 2 +- .../webhook_events/project_keys_added.ts | 2 +- .../webhook_events/project_keys_deleted.ts | 2 +- .../webhook_events/project_keys_modified.ts | 2 +- .../project_translation_proofread.ts | 2 +- .../project_translation_updated.ts | 2 +- src/types/webhooks.ts | 29 ++ test/ota/ota_sdk_tokens.spec.ts | 2 +- 301 files changed, 1995 insertions(+), 1331 deletions(-) create mode 100644 dist/interfaces/ota/ota_api_error.d.ts create mode 100644 dist/interfaces/ota/ota_api_error.js create mode 100644 dist/interfaces/ota/ota_api_error.js.map create mode 100644 dist/interfaces/ota/ota_bundle.d.ts create mode 100644 dist/interfaces/ota/ota_bundle.js create mode 100644 dist/interfaces/ota/ota_bundle.js.map create mode 100644 dist/interfaces/ota/ota_bundle_archive.d.ts create mode 100644 dist/interfaces/ota/ota_bundle_archive.js create mode 100644 dist/interfaces/ota/ota_bundle_archive.js.map create mode 100644 dist/interfaces/ota/ota_freeze_period.d.ts create mode 100644 dist/interfaces/ota/ota_freeze_period.js create mode 100644 dist/interfaces/ota/ota_freeze_period.js.map create mode 100644 dist/interfaces/ota/ota_sdk_token.d.ts create mode 100644 dist/interfaces/ota/ota_sdk_token.js create mode 100644 dist/interfaces/ota/ota_sdk_token.js.map create mode 100644 dist/interfaces/ota/ota_statistics.d.ts create mode 100644 dist/interfaces/ota/ota_statistics.js create mode 100644 dist/interfaces/ota/ota_statistics.js.map create mode 100644 dist/models/ota/ota_api_error.d.ts create mode 100644 dist/models/ota/ota_api_error.js create mode 100644 dist/models/ota/ota_api_error.js.map create mode 100644 dist/models/ota/ota_bundle.d.ts create mode 100644 dist/models/ota/ota_bundle.js create mode 100644 dist/models/ota/ota_bundle.js.map create mode 100644 dist/models/ota/ota_bundle_archive.d.ts create mode 100644 dist/models/ota/ota_bundle_archive.js create mode 100644 dist/models/ota/ota_bundle_archive.js.map create mode 100644 dist/models/ota/ota_freeze_period.d.ts create mode 100644 dist/models/ota/ota_freeze_period.js create mode 100644 dist/models/ota/ota_freeze_period.js.map create mode 100644 dist/models/ota/ota_sdk_token.d.ts create mode 100644 dist/models/ota/ota_sdk_token.js create mode 100644 dist/models/ota/ota_sdk_token.js.map create mode 100644 dist/models/ota/ota_statistics.d.ts create mode 100644 dist/models/ota/ota_statistics.js create mode 100644 dist/models/ota/ota_statistics.js.map create mode 100644 dist/types/billing_details.d.ts create mode 100644 dist/types/billing_details.js create mode 100644 dist/types/billing_details.js.map create mode 100644 dist/types/branches.d.ts create mode 100644 dist/types/branches.js create mode 100644 dist/types/branches.js.map create mode 100644 dist/types/cards.d.ts create mode 100644 dist/types/cards.js create mode 100644 dist/types/cards.js.map create mode 100644 dist/types/comments.d.ts create mode 100644 dist/types/comments.js create mode 100644 dist/types/comments.js.map create mode 100644 dist/types/common_get_params.d.ts create mode 100644 dist/types/common_get_params.js create mode 100644 dist/types/common_get_params.js.map create mode 100644 dist/types/contributors.d.ts create mode 100644 dist/types/contributors.js create mode 100644 dist/types/contributors.js.map create mode 100644 dist/types/files.d.ts create mode 100644 dist/types/files.js create mode 100644 dist/types/files.js.map create mode 100644 dist/types/keys.d.ts create mode 100644 dist/types/keys.js create mode 100644 dist/types/keys.js.map create mode 100644 dist/types/languages.d.ts create mode 100644 dist/types/languages.js create mode 100644 dist/types/languages.js.map create mode 100644 dist/types/orders.d.ts create mode 100644 dist/types/orders.js create mode 100644 dist/types/orders.js.map create mode 100644 dist/types/ota.d.ts create mode 100644 dist/types/ota.js create mode 100644 dist/types/ota.js.map create mode 100644 dist/types/projects.d.ts create mode 100644 dist/types/projects.js create mode 100644 dist/types/projects.js.map create mode 100644 dist/types/screenshots.d.ts create mode 100644 dist/types/screenshots.js create mode 100644 dist/types/screenshots.js.map create mode 100644 dist/types/segments.d.ts create mode 100644 dist/types/segments.js create mode 100644 dist/types/segments.js.map create mode 100644 dist/types/snapshots.d.ts create mode 100644 dist/types/snapshots.js create mode 100644 dist/types/snapshots.js.map create mode 100644 dist/types/tasks.d.ts create mode 100644 dist/types/tasks.js create mode 100644 dist/types/tasks.js.map create mode 100644 dist/types/team_users.d.ts create mode 100644 dist/types/team_users.js create mode 100644 dist/types/team_users.js.map create mode 100644 dist/types/teams.d.ts create mode 100644 dist/types/teams.js create mode 100644 dist/types/teams.js.map create mode 100644 dist/types/translation_statuses.d.ts create mode 100644 dist/types/translation_statuses.js create mode 100644 dist/types/translation_statuses.js.map create mode 100644 dist/types/translations.d.ts create mode 100644 dist/types/translations.js create mode 100644 dist/types/translations.js.map create mode 100644 dist/types/user_groups.d.ts create mode 100644 dist/types/user_groups.js create mode 100644 dist/types/user_groups.js.map create mode 100644 dist/types/webhooks.d.ts create mode 100644 dist/types/webhooks.js create mode 100644 dist/types/webhooks.js.map delete mode 100644 src/interfaces/create_project_key_input.ts delete mode 100644 src/interfaces/get_key_params.ts delete mode 100644 src/interfaces/key_params_with_pagination.ts delete mode 100644 src/interfaces/language_mapping.ts rename src/interfaces/{ => ota}/ota_api_error.ts (100%) rename src/interfaces/{ => ota}/ota_bundle.ts (100%) rename src/interfaces/{ => ota}/ota_bundle_archive.ts (100%) rename src/interfaces/{ => ota}/ota_freeze_period.ts (100%) rename src/interfaces/{ => ota}/ota_sdk_token.ts (100%) rename src/interfaces/{ => ota}/ota_statistics.ts (100%) delete mode 100644 src/interfaces/ota_framework.ts delete mode 100644 src/interfaces/ota_team_project.ts delete mode 100644 src/interfaces/ota_team_project_framework.ts delete mode 100644 src/interfaces/pagination_params.ts delete mode 100644 src/interfaces/project_only.ts delete mode 100644 src/interfaces/project_with_pagination.ts delete mode 100644 src/interfaces/team_only.ts delete mode 100644 src/interfaces/team_with_pagination.ts delete mode 100644 src/interfaces/upload_file_params.ts rename src/models/{ => ota}/ota_api_error.ts (53%) rename src/models/{ => ota}/ota_bundle.ts (77%) rename src/models/{ => ota}/ota_bundle_archive.ts (69%) rename src/models/{ => ota}/ota_freeze_period.ts (77%) rename src/models/{ => ota}/ota_sdk_token.ts (60%) rename src/models/{ => ota}/ota_statistics.ts (79%) rename src/types/{billing_details_params.ts => billing_details.ts} (100%) delete mode 100644 src/types/branch_params.ts create mode 100644 src/types/branches.ts delete mode 100644 src/types/bulk_update_key_params.ts rename src/types/{create_card_params.ts => cards.ts} (64%) delete mode 100644 src/types/comment_data.ts create mode 100644 src/types/comments.ts create mode 100644 src/types/common_get_params.ts delete mode 100644 src/types/contributor_create_data.ts delete mode 100644 src/types/contributor_languages.ts delete mode 100644 src/types/contributor_update_data.ts create mode 100644 src/types/contributors.ts delete mode 100644 src/types/create_key_data.ts delete mode 100644 src/types/create_key_params.ts delete mode 100644 src/types/create_language_params.ts delete mode 100644 src/types/create_project_params.ts delete mode 100644 src/types/create_screenshot_params.ts delete mode 100644 src/types/create_snapshot_params.ts delete mode 100644 src/types/create_task_params.ts delete mode 100644 src/types/create_translation_status_params.ts delete mode 100644 src/types/create_webhook_params.ts delete mode 100644 src/types/download_bundle.ts rename src/{interfaces/download_file_params.ts => types/files.ts} (61%) create mode 100644 src/types/keys.ts create mode 100644 src/types/languages.ts delete mode 100644 src/types/merge_branch_params.ts rename src/types/{create_order_params.ts => orders.ts} (100%) create mode 100644 src/types/ota.ts delete mode 100644 src/types/ota_resource_deleted.ts create mode 100644 src/types/projects.ts delete mode 100644 src/types/screenshot_data.ts create mode 100644 src/types/screenshots.ts create mode 100644 src/types/segments.ts create mode 100644 src/types/snapshots.ts delete mode 100644 src/types/task_language.ts create mode 100644 src/types/tasks.ts delete mode 100644 src/types/team_user_params.ts create mode 100644 src/types/team_users.ts create mode 100644 src/types/teams.ts delete mode 100644 src/types/translation_data.ts create mode 100644 src/types/translation_statuses.ts create mode 100644 src/types/translations.ts delete mode 100644 src/types/update_key_data.ts delete mode 100644 src/types/update_key_data_with_id.ts delete mode 100644 src/types/update_language_params.ts delete mode 100644 src/types/update_project_params.ts delete mode 100644 src/types/update_screenshot_params.ts delete mode 100644 src/types/update_task_params.ts delete mode 100644 src/types/update_translation_params.ts delete mode 100644 src/types/update_translation_status_params.ts delete mode 100644 src/types/update_webhook_params.ts rename src/types/{user_group_params.ts => user_groups.ts} (79%) delete mode 100644 src/types/webhook_event_lang_map.ts create mode 100644 src/types/webhooks.ts diff --git a/dist/collections/base_collection.d.ts b/dist/collections/base_collection.d.ts index ac6a84de..89507949 100644 --- a/dist/collections/base_collection.d.ts +++ b/dist/collections/base_collection.d.ts @@ -1,4 +1,4 @@ -import { HttpMethod } from "../types/http_method.js"; +import type { HttpMethod } from "../types/http_method.js"; import { ApiRequest } from "../http_client/base.js"; import { ApiError } from "../models/api_error.js"; import { PaginatedResult } from "../models/paginated_result.js"; diff --git a/dist/collections/branches.d.ts b/dist/collections/branches.d.ts index 42d9b1c4..218a36c5 100644 --- a/dist/collections/branches.d.ts +++ b/dist/collections/branches.d.ts @@ -1,20 +1,8 @@ import { BaseCollection } from "./base_collection.js"; import { Branch } from "../models/branch.js"; import { PaginatedResult } from "../interfaces/paginated_result.js"; -import { ProjectWithPagination } from "../interfaces/project_with_pagination.js"; -import { ProjectOnly } from "../interfaces/project_only.js"; -import { BranchParams } from "../types/branch_params.js"; -import { MergeBranchParams } from "../types/merge_branch_params.js"; -type BranchDeleted = { - project_id: string; - branch_deleted: boolean; -}; -type BranchMerged = { - project_id: string; - branch_merged: boolean; - branch: Branch; - target_branch: Branch; -}; +import type { ProjectWithPagination, ProjectOnly } from "../types/common_get_params.js"; +import type { BranchParams, MergeBranchParams, BranchDeleted, BranchMerged } from "../types/branches.js"; export declare class Branches extends BaseCollection { protected static rootElementName: string; protected static rootElementNameSingular: string; @@ -27,4 +15,3 @@ export declare class Branches extends BaseCollection { delete(branch_id: string | number, request_params: ProjectOnly): Promise; merge(branch_id: string | number, request_params: ProjectOnly, body?: MergeBranchParams): Promise; } -export {}; diff --git a/dist/collections/branches.js.map b/dist/collections/branches.js.map index 3f708fb2..2ab587bb 100644 --- a/dist/collections/branches.js.map +++ b/dist/collections/branches.js.map @@ -1 +1 @@ -{"version":3,"file":"branches.js","sourceRoot":"","sources":["../../src/collections/branches.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAmB7C,MAAM,OAAO,QAAS,SAAQ,cAAc;IAChC,MAAM,CAAC,eAAe,GAAG,UAAU,CAAC;IACpC,MAAM,CAAC,uBAAuB,GAAG,QAAQ,CAAC;IAC1C,MAAM,CAAC,SAAS,GAAG,wCAAwC,CAAC;IAC5D,MAAM,CAAC,YAAY,GAAG,MAAM,CAAC;IAEvC,IAAI,CACF,cAAqC;QAErC,OAAO,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;IACrC,CAAC;IAED,MAAM,CACJ,aAA2B,EAC3B,cAA2B;QAE3B,OAAO,IAAI,CAAC,QAAQ,CAClB,aAAa,EACb,cAAc,EACd,IAAI,CAAC,0BAA0B,CAChC,CAAC;IACJ,CAAC;IAED,GAAG,CACD,SAA0B,EAC1B,cAA2B;QAE3B,OAAO,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;IAC/C,CAAC;IAED,MAAM,CACJ,SAA0B,EAC1B,aAA2B,EAC3B,cAA2B;QAE3B,OAAO,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,aAAa,EAAE,cAAc,CAAC,CAAC;IACjE,CAAC;IAED,MAAM,CACJ,SAA0B,EAC1B,cAA2B;QAE3B,OAAO,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;IAClD,CAAC;IAED,KAAK,CACH,SAA0B,EAC1B,cAA2B,EAC3B,OAA0B,EAAE;QAE5B,MAAM,MAAM,GAAG;YACb,GAAG,cAAc;YACjB,GAAG,EAAE,EAAE,EAAE,SAAS,EAAE;SACrB,CAAC;QAEF,OAAO,IAAI,CAAC,aAAa,CACvB,MAAM,EACN,MAAM,EACN,IAAI,CAAC,cAAc,EACnB,IAAI,CAAC,YAAY,EACjB,IAAI,EACJ,8CAA8C,CAC/C,CAAC;IACJ,CAAC"} \ No newline at end of file +{"version":3,"file":"branches.js","sourceRoot":"","sources":["../../src/collections/branches.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAa7C,MAAM,OAAO,QAAS,SAAQ,cAAc;IAChC,MAAM,CAAC,eAAe,GAAG,UAAU,CAAC;IACpC,MAAM,CAAC,uBAAuB,GAAG,QAAQ,CAAC;IAC1C,MAAM,CAAC,SAAS,GAAG,wCAAwC,CAAC;IAC5D,MAAM,CAAC,YAAY,GAAG,MAAM,CAAC;IAEvC,IAAI,CACF,cAAqC;QAErC,OAAO,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;IACrC,CAAC;IAED,MAAM,CACJ,aAA2B,EAC3B,cAA2B;QAE3B,OAAO,IAAI,CAAC,QAAQ,CAClB,aAAa,EACb,cAAc,EACd,IAAI,CAAC,0BAA0B,CAChC,CAAC;IACJ,CAAC;IAED,GAAG,CACD,SAA0B,EAC1B,cAA2B;QAE3B,OAAO,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;IAC/C,CAAC;IAED,MAAM,CACJ,SAA0B,EAC1B,aAA2B,EAC3B,cAA2B;QAE3B,OAAO,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,aAAa,EAAE,cAAc,CAAC,CAAC;IACjE,CAAC;IAED,MAAM,CACJ,SAA0B,EAC1B,cAA2B;QAE3B,OAAO,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;IAClD,CAAC;IAED,KAAK,CACH,SAA0B,EAC1B,cAA2B,EAC3B,OAA0B,EAAE;QAE5B,MAAM,MAAM,GAAG;YACb,GAAG,cAAc;YACjB,GAAG,EAAE,EAAE,EAAE,SAAS,EAAE;SACrB,CAAC;QAEF,OAAO,IAAI,CAAC,aAAa,CACvB,MAAM,EACN,MAAM,EACN,IAAI,CAAC,cAAc,EACnB,IAAI,CAAC,YAAY,EACjB,IAAI,EACJ,8CAA8C,CAC/C,CAAC;IACJ,CAAC"} \ No newline at end of file diff --git a/dist/collections/comments.d.ts b/dist/collections/comments.d.ts index ba7798c7..5024d4f5 100644 --- a/dist/collections/comments.d.ts +++ b/dist/collections/comments.d.ts @@ -1,31 +1,16 @@ import { BaseCollection } from "./base_collection.js"; import { Comment } from "../models/comment.js"; import { PaginatedResult } from "../interfaces/paginated_result.js"; -import { ProjectWithPagination } from "../interfaces/project_with_pagination.js"; -import { ProjectOnly } from "../interfaces/project_only.js"; -interface ParamsWithPagination extends ProjectWithPagination { - key_id: number | string; -} -interface ProjectAndKey extends ProjectOnly { - key_id: number | string; -} -type CommentData = { - comment: string; -}; -type CommentDeleted = { - project_id: string; - comment_deleted: boolean; - branch?: string; -}; +import type { ProjectWithPagination } from "../types/common_get_params.js"; +import type { CommentData, CommentDeleted, KeyProjectPagination, ProjectAndKey } from "../types/comments.js"; export declare class Comments extends BaseCollection { protected static rootElementName: string; protected static rootElementNameSingular: string; protected static prefixURI: string; protected static elementClass: typeof Comment; - list(request_params: ParamsWithPagination): Promise>; + list(request_params: KeyProjectPagination): Promise>; create(comment_params: CommentData | CommentData[], request_params: ProjectAndKey): Promise; get(comment_id: string | number, request_params: ProjectAndKey): Promise; delete(comment_id: string | number, request_params: ProjectAndKey): Promise; list_project_comments(params: ProjectWithPagination): Promise>; } -export {}; diff --git a/dist/collections/comments.js.map b/dist/collections/comments.js.map index 9d53ebbc..f694a7b8 100644 --- a/dist/collections/comments.js.map +++ b/dist/collections/comments.js.map @@ -1 +1 @@ -{"version":3,"file":"comments.js","sourceRoot":"","sources":["../../src/collections/comments.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAuB/C,MAAM,OAAO,QAAS,SAAQ,cAAc;IAChC,MAAM,CAAC,eAAe,GAAG,UAAU,CAAC;IACpC,MAAM,CAAC,uBAAuB,GAAG,SAAS,CAAC;IAC3C,MAAM,CAAC,SAAS,GACxB,wDAAwD,CAAC;IACjD,MAAM,CAAC,YAAY,GAAG,OAAO,CAAC;IAExC,IAAI,CACF,cAAoC;QAEpC,OAAO,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;IACrC,CAAC;IAED,MAAM,CACJ,cAA2C,EAC3C,cAA6B;QAE7B,MAAM,IAAI,GAAG,EAAE,QAAQ,EAAE,IAAI,CAAC,UAAU,CAAC,cAAc,CAAC,EAAE,CAAC;QAC3D,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,qBAAqB,CAAC,CAAC;IACzE,CAAC;IAED,GAAG,CACD,UAA2B,EAC3B,cAA6B;QAE7B,OAAO,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;IAChD,CAAC;IAED,MAAM,CACJ,UAA2B,EAC3B,cAA6B;QAE7B,OAAO,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;IACnD,CAAC;IAED,qBAAqB,CACnB,MAA6B;QAE7B,OAAO,IAAI,CAAC,aAAa,CACvB,KAAK,EACL,MAAM,EACN,IAAI,CAAC,qBAAqB,EAC1B,IAAI,CAAC,YAAY,EACjB,IAAI,EACJ,kCAAkC,CACnC,CAAC;IACJ,CAAC"} \ No newline at end of file +{"version":3,"file":"comments.js","sourceRoot":"","sources":["../../src/collections/comments.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAU/C,MAAM,OAAO,QAAS,SAAQ,cAAc;IAChC,MAAM,CAAC,eAAe,GAAG,UAAU,CAAC;IACpC,MAAM,CAAC,uBAAuB,GAAG,SAAS,CAAC;IAC3C,MAAM,CAAC,SAAS,GACxB,wDAAwD,CAAC;IACjD,MAAM,CAAC,YAAY,GAAG,OAAO,CAAC;IAExC,IAAI,CACF,cAAoC;QAEpC,OAAO,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;IACrC,CAAC;IAED,MAAM,CACJ,cAA2C,EAC3C,cAA6B;QAE7B,MAAM,IAAI,GAAG,EAAE,QAAQ,EAAE,IAAI,CAAC,UAAU,CAAC,cAAc,CAAC,EAAE,CAAC;QAC3D,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,qBAAqB,CAAC,CAAC;IACzE,CAAC;IAED,GAAG,CACD,UAA2B,EAC3B,cAA6B;QAE7B,OAAO,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;IAChD,CAAC;IAED,MAAM,CACJ,UAA2B,EAC3B,cAA6B;QAE7B,OAAO,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;IACnD,CAAC;IAED,qBAAqB,CACnB,MAA6B;QAE7B,OAAO,IAAI,CAAC,aAAa,CACvB,KAAK,EACL,MAAM,EACN,IAAI,CAAC,qBAAqB,EAC1B,IAAI,CAAC,YAAY,EACjB,IAAI,EACJ,kCAAkC,CACnC,CAAC;IACJ,CAAC"} \ No newline at end of file diff --git a/dist/collections/contributors.d.ts b/dist/collections/contributors.d.ts index cb3564b0..16b5d2c8 100644 --- a/dist/collections/contributors.d.ts +++ b/dist/collections/contributors.d.ts @@ -1,15 +1,8 @@ import { BaseCollection } from "./base_collection.js"; import { Contributor } from "../models/contributor.js"; -import { ProjectWithPagination } from "../interfaces/project_with_pagination.js"; import { PaginatedResult } from "../interfaces/paginated_result.js"; -import { ProjectOnly } from "../interfaces/project_only.js"; -import { ContributorCreateData } from "../types/contributor_create_data.js"; -import { ContributorUpdateData } from "../types/contributor_update_data.js"; -type ContributorDeleted = { - project_id: string; - contributor_deleted: boolean; - branch?: string; -}; +import type { ProjectWithPagination, ProjectOnly } from "../types/common_get_params.js"; +import type { ContributorCreateData, ContributorUpdateData, ContributorDeleted } from "../types/contributors.js"; export declare class Contributors extends BaseCollection { protected static rootElementName: string; protected static rootElementNameSingular: string; @@ -21,4 +14,3 @@ export declare class Contributors extends BaseCollection { update(contributor_id: string | number, contributor_params: ContributorUpdateData, request_params: ProjectOnly): Promise; delete(contributor_id: string | number, request_params: ProjectOnly): Promise; } -export {}; diff --git a/dist/collections/contributors.js.map b/dist/collections/contributors.js.map index bd57bc6b..e07a3c31 100644 --- a/dist/collections/contributors.js.map +++ b/dist/collections/contributors.js.map @@ -1 +1 @@ -{"version":3,"file":"contributors.js","sourceRoot":"","sources":["../../src/collections/contributors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAavD,MAAM,OAAO,YAAa,SAAQ,cAAc;IACpC,MAAM,CAAC,eAAe,GAAG,cAAc,CAAC;IACxC,MAAM,CAAC,uBAAuB,GAAG,aAAa,CAAC;IAC/C,MAAM,CAAC,SAAS,GAAG,4CAA4C,CAAC;IAChE,MAAM,CAAC,YAAY,GAAG,WAAW,CAAC;IAE5C,IAAI,CACF,cAAqC;QAErC,OAAO,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;IACrC,CAAC;IAED,MAAM,CACJ,kBAAmE,EACnE,cAA2B;QAE3B,MAAM,IAAI,GAAG,EAAE,YAAY,EAAE,IAAI,CAAC,UAAU,CAAC,kBAAkB,CAAC,EAAE,CAAC;QAEnE,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,qBAAqB,CAAC,CAAC;IACzE,CAAC;IAED,GAAG,CACD,cAA+B,EAC/B,cAA2B;QAE3B,OAAO,IAAI,CAAC,KAAK,CAAC,cAAc,EAAE,cAAc,CAAC,CAAC;IACpD,CAAC;IAED,MAAM,CACJ,cAA+B,EAC/B,kBAAyC,EACzC,cAA2B;QAE3B,OAAO,IAAI,CAAC,QAAQ,CAAC,cAAc,EAAE,kBAAkB,EAAE,cAAc,CAAC,CAAC;IAC3E,CAAC;IAED,MAAM,CACJ,cAA+B,EAC/B,cAA2B;QAE3B,OAAO,IAAI,CAAC,QAAQ,CAAC,cAAc,EAAE,cAAc,CAAC,CAAC;IACvD,CAAC"} \ No newline at end of file +{"version":3,"file":"contributors.js","sourceRoot":"","sources":["../../src/collections/contributors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAYvD,MAAM,OAAO,YAAa,SAAQ,cAAc;IACpC,MAAM,CAAC,eAAe,GAAG,cAAc,CAAC;IACxC,MAAM,CAAC,uBAAuB,GAAG,aAAa,CAAC;IAC/C,MAAM,CAAC,SAAS,GAAG,4CAA4C,CAAC;IAChE,MAAM,CAAC,YAAY,GAAG,WAAW,CAAC;IAE5C,IAAI,CACF,cAAqC;QAErC,OAAO,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;IACrC,CAAC;IAED,MAAM,CACJ,kBAAmE,EACnE,cAA2B;QAE3B,MAAM,IAAI,GAAG,EAAE,YAAY,EAAE,IAAI,CAAC,UAAU,CAAC,kBAAkB,CAAC,EAAE,CAAC;QAEnE,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,qBAAqB,CAAC,CAAC;IACzE,CAAC;IAED,GAAG,CACD,cAA+B,EAC/B,cAA2B;QAE3B,OAAO,IAAI,CAAC,KAAK,CAAC,cAAc,EAAE,cAAc,CAAC,CAAC;IACpD,CAAC;IAED,MAAM,CACJ,cAA+B,EAC/B,kBAAyC,EACzC,cAA2B;QAE3B,OAAO,IAAI,CAAC,QAAQ,CAAC,cAAc,EAAE,kBAAkB,EAAE,cAAc,CAAC,CAAC;IAC3E,CAAC;IAED,MAAM,CACJ,cAA+B,EAC/B,cAA2B;QAE3B,OAAO,IAAI,CAAC,QAAQ,CAAC,cAAc,EAAE,cAAc,CAAC,CAAC;IACvD,CAAC"} \ No newline at end of file diff --git a/dist/collections/files.d.ts b/dist/collections/files.d.ts index 4dfd4ef5..1843c425 100644 --- a/dist/collections/files.d.ts +++ b/dist/collections/files.d.ts @@ -1,19 +1,9 @@ import { BaseCollection } from "./base_collection.js"; import { File } from "../models/file.js"; import { QueuedProcess } from "../models/queued_process.js"; -import { UploadFileParams } from "../interfaces/upload_file_params.js"; -import { DownloadFileParams } from "../interfaces/download_file_params.js"; -import { ProjectWithPagination } from "../interfaces/project_with_pagination.js"; import { PaginatedResult } from "../interfaces/paginated_result.js"; -import { ProjectOnly } from "../interfaces/project_only.js"; -import { DownloadBundle } from "../types/download_bundle.js"; -interface ListFileParams extends ProjectWithPagination { - filter_filename?: string; -} -type FileDeleted = { - project_id: string; - file_deleted: boolean; -}; +import type { ProjectOnly } from "../types/common_get_params.js"; +import type { DownloadBundle, FileDeleted, DownloadFileParams, UploadFileParams, ListFileParams } from "../types/files.js"; export declare class Files extends BaseCollection { protected static rootElementName: string; protected static prefixURI: string; @@ -25,4 +15,3 @@ export declare class Files extends BaseCollection { download(project_id: string, download: DownloadFileParams): Promise; delete(file_id: string | number, request_params: ProjectOnly): Promise; } -export {}; diff --git a/dist/collections/files.js.map b/dist/collections/files.js.map index b44a4c43..ad375e91 100644 --- a/dist/collections/files.js.map +++ b/dist/collections/files.js.map @@ -1 +1 @@ -{"version":3,"file":"files.js","sourceRoot":"","sources":["../../src/collections/files.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAiB5D,MAAM,OAAO,KAAM,SAAQ,cAAc;IAC7B,MAAM,CAAC,eAAe,GAAG,OAAO,CAAC;IACjC,MAAM,CAAC,SAAS,GAAG,qCAAqC,CAAC;IACzD,MAAM,CAAC,YAAY,GAAG,IAAI,CAAC;IAE3B,MAAM,CAAC,4BAA4B,GAAG,SAAS,CAAC;IAChD,MAAM,CAAC,qBAAqB,GAAG,aAAa,CAAC;IAEvD,IAAI,CAAC,cAA8B;QACjC,OAAO,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;IACrC,CAAC;IAED,MAAM,CAAC,UAAkB,EAAE,MAAwB;QACjD,OAAO,IAAI,CAAC,aAAa,CACvB,MAAM,EACN,EAAE,UAAU,EAAE,UAAU,EAAE,EAC1B,IAAI,CAAC,mCAAmC,EACxC,IAAI,CAAC,YAAY,EACjB,MAAM,EACN,sCAAsC,CACvC,CAAC;IACJ,CAAC;IAED,QAAQ,CACN,UAAkB,EAClB,QAA4B;QAE5B,OAAO,IAAI,CAAC,aAAa,CACvB,MAAM,EACN,EAAE,UAAU,EAAE,UAAU,EAAE,EAC1B,IAAI,CAAC,cAAc,EACnB,IAAI,CAAC,YAAY,EACjB,QAAQ,EACR,wCAAwC,CACzC,CAAC;IACJ,CAAC;IAED,MAAM,CACJ,OAAwB,EACxB,cAA2B;QAE3B,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;IAChD,CAAC"} \ No newline at end of file +{"version":3,"file":"files.js","sourceRoot":"","sources":["../../src/collections/files.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAW5D,MAAM,OAAO,KAAM,SAAQ,cAAc;IAC7B,MAAM,CAAC,eAAe,GAAG,OAAO,CAAC;IACjC,MAAM,CAAC,SAAS,GAAG,qCAAqC,CAAC;IACzD,MAAM,CAAC,YAAY,GAAG,IAAI,CAAC;IAE3B,MAAM,CAAC,4BAA4B,GAAG,SAAS,CAAC;IAChD,MAAM,CAAC,qBAAqB,GAAG,aAAa,CAAC;IAEvD,IAAI,CAAC,cAA8B;QACjC,OAAO,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;IACrC,CAAC;IAED,MAAM,CAAC,UAAkB,EAAE,MAAwB;QACjD,OAAO,IAAI,CAAC,aAAa,CACvB,MAAM,EACN,EAAE,UAAU,EAAE,UAAU,EAAE,EAC1B,IAAI,CAAC,mCAAmC,EACxC,IAAI,CAAC,YAAY,EACjB,MAAM,EACN,sCAAsC,CACvC,CAAC;IACJ,CAAC;IAED,QAAQ,CACN,UAAkB,EAClB,QAA4B;QAE5B,OAAO,IAAI,CAAC,aAAa,CACvB,MAAM,EACN,EAAE,UAAU,EAAE,UAAU,EAAE,EAC1B,IAAI,CAAC,cAAc,EACnB,IAAI,CAAC,YAAY,EACjB,QAAQ,EACR,wCAAwC,CACzC,CAAC;IACJ,CAAC;IAED,MAAM,CACJ,OAAwB,EACxB,cAA2B;QAE3B,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;IAChD,CAAC"} \ No newline at end of file diff --git a/dist/collections/keys.d.ts b/dist/collections/keys.d.ts index 84018abf..6be98e08 100644 --- a/dist/collections/keys.d.ts +++ b/dist/collections/keys.d.ts @@ -1,25 +1,9 @@ import { BaseCollection } from "./base_collection.js"; import { Key } from "../models/key.js"; -import { KeyParamsWithPagination } from "../interfaces/key_params_with_pagination.js"; import { PaginatedResult } from "../interfaces/paginated_result.js"; -import { ProjectOnly } from "../interfaces/project_only.js"; -import { CreateKeyParams } from "../types/create_key_params.js"; -import { UpdateKeyData } from "../types/update_key_data.js"; -import { BulkUpdateKeyParams } from "../types/bulk_update_key_params.js"; import { BulkResult } from "../interfaces/bulk_result.js"; -import { GetKeyParams } from "../interfaces/get_key_params.js"; -type KeyDeleted = { - project_id: string; - key_removed: boolean; - keys_locked?: number; - branch?: string; -}; -type KeysBulkDeleted = { - project_id: string; - keys_removed: boolean; - keys_locked: number; - branch?: string; -}; +import type { ProjectOnly } from "../types/common_get_params.js"; +import type { CreateKeyParams, UpdateKeyData, BulkUpdateKeyParams, KeyDeleted, KeysBulkDeleted, KeyParamsWithPagination, GetKeyParams } from "../types/keys.js"; export declare class Keys extends BaseCollection { protected static rootElementName: string; protected static rootElementNameSingular: string; @@ -33,4 +17,3 @@ export declare class Keys extends BaseCollection { bulk_update(key_params: BulkUpdateKeyParams, request_params: ProjectOnly): Promise>; bulk_delete(key_ids: number[] | string[], request_params: ProjectOnly): Promise; } -export {}; diff --git a/dist/collections/keys.js.map b/dist/collections/keys.js.map index ec8f14ae..bf7f6011 100644 --- a/dist/collections/keys.js.map +++ b/dist/collections/keys.js.map @@ -1 +1 @@ -{"version":3,"file":"keys.js","sourceRoot":"","sources":["../../src/collections/keys.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAwBvC,MAAM,OAAO,IAAK,SAAQ,cAAc;IAC5B,MAAM,CAAC,eAAe,GAAG,MAAM,CAAC;IAChC,MAAM,CAAC,uBAAuB,GAAG,KAAK,CAAC;IACvC,MAAM,CAAC,SAAS,GAAG,oCAAoC,CAAC;IACxD,MAAM,CAAC,YAAY,GAAG,GAAG,CAAC;IAEpC,IAAI,CAAC,cAAuC;QAC1C,OAAO,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;IACrC,CAAC;IAED,MAAM,CACJ,UAA2B,EAC3B,cAA2B;QAE3B,OAAO,IAAI,CAAC,QAAQ,CAClB,UAAU,EACV,cAAc,EACd,IAAI,CAAC,yBAAyB,CAC/B,CAAC;IACJ,CAAC;IAED,GAAG,CAAC,MAAuB,EAAE,cAA4B;QACvD,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IAC5C,CAAC;IAED,MAAM,CACJ,MAAuB,EACvB,UAAyB,EACzB,cAA2B;QAE3B,OAAO,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,UAAU,EAAE,cAAc,CAAC,CAAC;IAC3D,CAAC;IAED,MAAM,CACJ,MAAuB,EACvB,cAA2B;QAE3B,OAAO,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IAC/C,CAAC;IAED,WAAW,CACT,UAA+B,EAC/B,cAA2B;QAE3B,OAAO,IAAI,CAAC,aAAa,CACvB,KAAK,EACL,cAAc,EACd,IAAI,CAAC,yBAAyB,EAC9B,IAAI,CAAC,YAAY,EACjB,UAAU,EACV,8BAA8B,CAC/B,CAAC;IACJ,CAAC;IAED,WAAW,CACT,OAA4B,EAC5B,cAA2B;QAE3B,MAAM,IAAI,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;QAEhD,OAAO,IAAI,CAAC,aAAa,CACvB,QAAQ,EACR,cAAc,EACd,IAAI,CAAC,cAAc,EACnB,IAAI,CAAC,YAAY,EACjB,IAAI,EACJ,8BAA8B,CAC/B,CAAC;IACJ,CAAC"} \ No newline at end of file +{"version":3,"file":"keys.js","sourceRoot":"","sources":["../../src/collections/keys.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAcvC,MAAM,OAAO,IAAK,SAAQ,cAAc;IAC5B,MAAM,CAAC,eAAe,GAAG,MAAM,CAAC;IAChC,MAAM,CAAC,uBAAuB,GAAG,KAAK,CAAC;IACvC,MAAM,CAAC,SAAS,GAAG,oCAAoC,CAAC;IACxD,MAAM,CAAC,YAAY,GAAG,GAAG,CAAC;IAEpC,IAAI,CAAC,cAAuC;QAC1C,OAAO,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;IACrC,CAAC;IAED,MAAM,CACJ,UAA2B,EAC3B,cAA2B;QAE3B,OAAO,IAAI,CAAC,QAAQ,CAClB,UAAU,EACV,cAAc,EACd,IAAI,CAAC,yBAAyB,CAC/B,CAAC;IACJ,CAAC;IAED,GAAG,CAAC,MAAuB,EAAE,cAA4B;QACvD,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IAC5C,CAAC;IAED,MAAM,CACJ,MAAuB,EACvB,UAAyB,EACzB,cAA2B;QAE3B,OAAO,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,UAAU,EAAE,cAAc,CAAC,CAAC;IAC3D,CAAC;IAED,MAAM,CACJ,MAAuB,EACvB,cAA2B;QAE3B,OAAO,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IAC/C,CAAC;IAED,WAAW,CACT,UAA+B,EAC/B,cAA2B;QAE3B,OAAO,IAAI,CAAC,aAAa,CACvB,KAAK,EACL,cAAc,EACd,IAAI,CAAC,yBAAyB,EAC9B,IAAI,CAAC,YAAY,EACjB,UAAU,EACV,8BAA8B,CAC/B,CAAC;IACJ,CAAC;IAED,WAAW,CACT,OAA4B,EAC5B,cAA2B;QAE3B,MAAM,IAAI,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;QAEhD,OAAO,IAAI,CAAC,aAAa,CACvB,QAAQ,EACR,cAAc,EACd,IAAI,CAAC,cAAc,EACnB,IAAI,CAAC,YAAY,EACjB,IAAI,EACJ,8BAA8B,CAC/B,CAAC;IACJ,CAAC"} \ No newline at end of file diff --git a/dist/collections/languages.d.ts b/dist/collections/languages.d.ts index 1d3ceb7a..2d9fc458 100644 --- a/dist/collections/languages.d.ts +++ b/dist/collections/languages.d.ts @@ -1,17 +1,9 @@ import { Language } from "../models/language.js"; import { BaseCollection } from "./base_collection.js"; import { PaginatedResult } from "../interfaces/paginated_result.js"; -import { ProjectWithPagination } from "../interfaces/project_with_pagination.js"; -import { ProjectOnly } from "../interfaces/project_only.js"; import { BulkResult } from "../interfaces/bulk_result.js"; -import { PaginationParams } from "../interfaces/pagination_params.js"; -import { CreateLanguageParams } from "../types/create_language_params.js"; -import { UpdateLanguageParams } from "../types/update_language_params.js"; -type LanguageDeleted = { - project_id: string; - language_deleted: boolean; - branch?: string; -}; +import type { ProjectWithPagination, ProjectOnly, PaginationParams } from "../types/common_get_params.js"; +import type { CreateLanguageParams, UpdateLanguageParams, LanguageDeleted } from "../types/languages.js"; export declare class Languages extends BaseCollection { protected static rootElementName: string; protected static rootElementNameSingular: string; @@ -24,4 +16,3 @@ export declare class Languages extends BaseCollection { update(lang_id: string | number, lang_params: UpdateLanguageParams, request_params: ProjectOnly): Promise; delete(lang_id: string | number, request_params: ProjectOnly): Promise; } -export {}; diff --git a/dist/collections/languages.js.map b/dist/collections/languages.js.map index 7a9db809..d0312b0c 100644 --- a/dist/collections/languages.js.map +++ b/dist/collections/languages.js.map @@ -1 +1 @@ -{"version":3,"file":"languages.js","sourceRoot":"","sources":["../../src/collections/languages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAetD,MAAM,OAAO,SAAU,SAAQ,cAAc;IACjC,MAAM,CAAC,eAAe,GAAG,WAAW,CAAC;IACrC,MAAM,CAAC,uBAAuB,GAAG,UAAU,CAAC;IAC5C,MAAM,CAAC,SAAS,GAAG,yCAAyC,CAAC;IAC7D,MAAM,CAAC,YAAY,GAAG,QAAQ,CAAC;IAEzC,gBAAgB,CACd,SAA2B,EAAE;QAE7B,OAAO,IAAI,CAAC,aAAa,CACvB,KAAK,EACL,MAAM,EACN,IAAI,CAAC,qBAAqB,EAC1B,IAAI,CAAC,YAAY,EACjB,IAAI,EACJ,kBAAkB,CACnB,CAAC;IACJ,CAAC;IAED,IAAI,CACF,cAAqC;QAErC,OAAO,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;IACrC,CAAC;IAED,MAAM,CACJ,QAAuD,EACvD,cAA2B;QAE3B,MAAM,IAAI,GAAG,EAAE,SAAS,EAAE,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;QACtD,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,yBAAyB,CAAC,CAAC;IAC7E,CAAC;IAED,GAAG,CACD,OAAwB,EACxB,cAA2B;QAE3B,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;IAC7C,CAAC;IAED,MAAM,CACJ,OAAwB,EACxB,WAAiC,EACjC,cAA2B;QAE3B,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,WAAW,EAAE,cAAc,CAAC,CAAC;IAC7D,CAAC;IAED,MAAM,CACJ,OAAwB,EACxB,cAA2B;QAE3B,OAAO,KAAK,CAAC,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;IACjD,CAAC"} \ No newline at end of file +{"version":3,"file":"languages.js","sourceRoot":"","sources":["../../src/collections/languages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AActD,MAAM,OAAO,SAAU,SAAQ,cAAc;IACjC,MAAM,CAAC,eAAe,GAAG,WAAW,CAAC;IACrC,MAAM,CAAC,uBAAuB,GAAG,UAAU,CAAC;IAC5C,MAAM,CAAC,SAAS,GAAG,yCAAyC,CAAC;IAC7D,MAAM,CAAC,YAAY,GAAG,QAAQ,CAAC;IAEzC,gBAAgB,CACd,SAA2B,EAAE;QAE7B,OAAO,IAAI,CAAC,aAAa,CACvB,KAAK,EACL,MAAM,EACN,IAAI,CAAC,qBAAqB,EAC1B,IAAI,CAAC,YAAY,EACjB,IAAI,EACJ,kBAAkB,CACnB,CAAC;IACJ,CAAC;IAED,IAAI,CACF,cAAqC;QAErC,OAAO,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;IACrC,CAAC;IAED,MAAM,CACJ,QAAuD,EACvD,cAA2B;QAE3B,MAAM,IAAI,GAAG,EAAE,SAAS,EAAE,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;QACtD,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,yBAAyB,CAAC,CAAC;IAC7E,CAAC;IAED,GAAG,CACD,OAAwB,EACxB,cAA2B;QAE3B,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;IAC7C,CAAC;IAED,MAAM,CACJ,OAAwB,EACxB,WAAiC,EACjC,cAA2B;QAE3B,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,WAAW,EAAE,cAAc,CAAC,CAAC;IAC7D,CAAC;IAED,MAAM,CACJ,OAAwB,EACxB,cAA2B;QAE3B,OAAO,KAAK,CAAC,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;IACjD,CAAC"} \ No newline at end of file diff --git a/dist/collections/orders.d.ts b/dist/collections/orders.d.ts index 3de483f6..0ca84803 100644 --- a/dist/collections/orders.d.ts +++ b/dist/collections/orders.d.ts @@ -1,9 +1,9 @@ import { Order } from "../models/order.js"; import { BaseCollection } from "./base_collection.js"; -import { TeamWithPagination } from "../interfaces/team_with_pagination.js"; -import { TeamOnly } from "../interfaces/team_only.js"; import { PaginatedResult } from "../interfaces/paginated_result.js"; -import { CreateOrderParams } from "../types/create_order_params.js"; +import type { TeamWithPagination } from "../types/teams.js"; +import type { TeamOnly } from "../types/common_get_params.js"; +import type { CreateOrderParams } from "../types/orders.js"; export declare class Orders extends BaseCollection { protected static rootElementName: string; protected static prefixURI: string; diff --git a/dist/collections/payment_cards.d.ts b/dist/collections/payment_cards.d.ts index e942c4bf..d17348f5 100644 --- a/dist/collections/payment_cards.d.ts +++ b/dist/collections/payment_cards.d.ts @@ -1,12 +1,8 @@ import { PaymentCard } from "../models/payment_card.js"; import { BaseCollection } from "./base_collection.js"; -import { PaginationParams } from "../interfaces/pagination_params.js"; import { PaginatedResult } from "../interfaces/paginated_result.js"; -import { CreateCardParams } from "../types/create_card_params.js"; -type CardDeleted = { - card_id: string; - card_deleted: boolean; -}; +import type { PaginationParams } from "../types/common_get_params.js"; +import type { CreateCardParams, CardDeleted } from "../types/cards.js"; export declare class PaymentCards extends BaseCollection { protected static rootElementName: string; protected static rootElementNameSingular: string; @@ -17,4 +13,3 @@ export declare class PaymentCards extends BaseCollection { get(card_id: string | number): Promise; delete(card_id: string | number): Promise; } -export {}; diff --git a/dist/collections/payment_cards.js.map b/dist/collections/payment_cards.js.map index b44e00f9..1ffc854c 100644 --- a/dist/collections/payment_cards.js.map +++ b/dist/collections/payment_cards.js.map @@ -1 +1 @@ -{"version":3,"file":"payment_cards.js","sourceRoot":"","sources":["../../src/collections/payment_cards.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAUtD,MAAM,OAAO,YAAa,SAAQ,cAAc;IACpC,MAAM,CAAC,eAAe,GAAG,eAAe,CAAC;IACzC,MAAM,CAAC,uBAAuB,GAAG,cAAc,CAAC;IAChD,MAAM,CAAC,SAAS,GAAG,qBAAqB,CAAC;IACzC,MAAM,CAAC,YAAY,GAAG,WAAW,CAAC;IAE5C,IAAI,CACF,iBAAmC,EAAE;QAErC,OAAO,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;IACrC,CAAC;IAED,MAAM,CAAC,WAA6B;QAClC,OAAO,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;IACpC,CAAC;IAED,GAAG,CAAC,OAAwB;QAC1B,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAC7B,CAAC;IAED,MAAM,CAAC,OAAwB;QAC7B,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IAChC,CAAC"} \ No newline at end of file +{"version":3,"file":"payment_cards.js","sourceRoot":"","sources":["../../src/collections/payment_cards.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAKtD,MAAM,OAAO,YAAa,SAAQ,cAAc;IACpC,MAAM,CAAC,eAAe,GAAG,eAAe,CAAC;IACzC,MAAM,CAAC,uBAAuB,GAAG,cAAc,CAAC;IAChD,MAAM,CAAC,SAAS,GAAG,qBAAqB,CAAC;IACzC,MAAM,CAAC,YAAY,GAAG,WAAW,CAAC;IAE5C,IAAI,CACF,iBAAmC,EAAE;QAErC,OAAO,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;IACrC,CAAC;IAED,MAAM,CAAC,WAA6B;QAClC,OAAO,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;IACpC,CAAC;IAED,GAAG,CAAC,OAAwB;QAC1B,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAC7B,CAAC;IAED,MAAM,CAAC,OAAwB;QAC7B,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IAChC,CAAC"} \ No newline at end of file diff --git a/dist/collections/projects.d.ts b/dist/collections/projects.d.ts index 9f8d5240..8ef02933 100644 --- a/dist/collections/projects.d.ts +++ b/dist/collections/projects.d.ts @@ -1,23 +1,7 @@ import { Project } from "../models/project.js"; import { BaseCollection } from "./base_collection.js"; -import { PaginationParams } from "../interfaces/pagination_params.js"; import { PaginatedResult } from "../interfaces/paginated_result.js"; -import { CreateProjectParams } from "../types/create_project_params.js"; -import { UpdateProjectParams } from "../types/update_project_params.js"; -interface ProjectListParams extends PaginationParams { - filter_team_id?: number | string; - filter_names?: string; - include_statistics?: string | number; - include_settings?: string | number; -} -type ProjectDeleted = { - project_id: string; - project_deleted: boolean; -}; -type ProjectEmptied = { - project_id: string; - keys_deleted: boolean; -}; +import type { CreateProjectParams, UpdateProjectParams, ProjectDeleted, ProjectEmptied, ProjectListParams } from "../types/projects.js"; export declare class Projects extends BaseCollection { protected static rootElementName: string; protected static prefixURI: string; @@ -29,4 +13,3 @@ export declare class Projects extends BaseCollection { delete(project_id: string | number): Promise; empty(project_id: any): Promise; } -export {}; diff --git a/dist/collections/projects.js.map b/dist/collections/projects.js.map index bb6812fc..bb10644e 100644 --- a/dist/collections/projects.js.map +++ b/dist/collections/projects.js.map @@ -1 +1 @@ -{"version":3,"file":"projects.js","sourceRoot":"","sources":["../../src/collections/projects.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAuBtD,MAAM,OAAO,QAAS,SAAQ,cAAc;IAChC,MAAM,CAAC,eAAe,GAAG,UAAU,CAAC;IACpC,MAAM,CAAC,SAAS,GAAG,gBAAgB,CAAC;IACpC,MAAM,CAAC,YAAY,GAAG,OAAO,CAAC;IAExC,IAAI,CACF,iBAAoC,EAAE;QAEtC,OAAO,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;IACrC,CAAC;IAED,MAAM,CAAC,cAAmC;QACxC,OAAO,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;IACvC,CAAC;IAED,GAAG,CAAC,UAA2B;QAC7B,OAAO,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;IAChC,CAAC;IAED,MAAM,CACJ,UAA2B,EAC3B,cAAmC;QAEnC,OAAO,IAAI,CAAC,QAAQ,CAClB,UAAU,EACV,cAAc,EACd,EAAE,EACF,IAAI,CAAC,sBAAsB,CAC5B,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,UAA2B;QAChC,OAAO,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;IACnC,CAAC;IAED,KAAK,CAAC,UAAe;QACnB,OAAO,IAAI,CAAC,aAAa,CACvB,KAAK,EACL,EAAE,UAAU,EAAE,UAAU,EAAE,EAC1B,IAAI,CAAC,cAAc,EACnB,IAAI,CAAC,YAAY,EACjB,IAAI,EACJ,+BAA+B,CAChC,CAAC;IACJ,CAAC"} \ No newline at end of file +{"version":3,"file":"projects.js","sourceRoot":"","sources":["../../src/collections/projects.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAUtD,MAAM,OAAO,QAAS,SAAQ,cAAc;IAChC,MAAM,CAAC,eAAe,GAAG,UAAU,CAAC;IACpC,MAAM,CAAC,SAAS,GAAG,gBAAgB,CAAC;IACpC,MAAM,CAAC,YAAY,GAAG,OAAO,CAAC;IAExC,IAAI,CACF,iBAAoC,EAAE;QAEtC,OAAO,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;IACrC,CAAC;IAED,MAAM,CAAC,cAAmC;QACxC,OAAO,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;IACvC,CAAC;IAED,GAAG,CAAC,UAA2B;QAC7B,OAAO,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;IAChC,CAAC;IAED,MAAM,CACJ,UAA2B,EAC3B,cAAmC;QAEnC,OAAO,IAAI,CAAC,QAAQ,CAClB,UAAU,EACV,cAAc,EACd,EAAE,EACF,IAAI,CAAC,sBAAsB,CAC5B,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,UAA2B;QAChC,OAAO,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;IACnC,CAAC;IAED,KAAK,CAAC,UAAe;QACnB,OAAO,IAAI,CAAC,aAAa,CACvB,KAAK,EACL,EAAE,UAAU,EAAE,UAAU,EAAE,EAC1B,IAAI,CAAC,cAAc,EACnB,IAAI,CAAC,YAAY,EACjB,IAAI,EACJ,+BAA+B,CAChC,CAAC;IACJ,CAAC"} \ No newline at end of file diff --git a/dist/collections/queued_processes.d.ts b/dist/collections/queued_processes.d.ts index a6ae2b20..6d601c85 100644 --- a/dist/collections/queued_processes.d.ts +++ b/dist/collections/queued_processes.d.ts @@ -1,8 +1,7 @@ import { QueuedProcess } from "../models/queued_process.js"; import { BaseCollection } from "./base_collection.js"; -import { ProjectWithPagination } from "../interfaces/project_with_pagination.js"; import { PaginatedResult } from "../interfaces/paginated_result.js"; -import { ProjectOnly } from "../interfaces/project_only.js"; +import type { ProjectWithPagination, ProjectOnly } from "../types/common_get_params.js"; export declare class QueuedProcesses extends BaseCollection { protected static rootElementName: string; protected static rootElementNameSingular: string; diff --git a/dist/collections/queued_processes.js.map b/dist/collections/queued_processes.js.map index bb857780..76dba8d3 100644 --- a/dist/collections/queued_processes.js.map +++ b/dist/collections/queued_processes.js.map @@ -1 +1 @@ -{"version":3,"file":"queued_processes.js","sourceRoot":"","sources":["../../src/collections/queued_processes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAKtD,MAAM,OAAO,eAAgB,SAAQ,cAAc;IACvC,MAAM,CAAC,eAAe,GAAG,WAAW,CAAC;IACrC,MAAM,CAAC,uBAAuB,GAAG,SAAS,CAAC;IAC3C,MAAM,CAAC,SAAS,GAAG,yCAAyC,CAAC;IAC7D,MAAM,CAAC,YAAY,GAAG,aAAa,CAAC;IAE9C,IAAI,CACF,cAAqC;QAErC,OAAO,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;IACrC,CAAC;IAED,GAAG,CACD,UAA2B,EAC3B,cAA2B;QAE3B,OAAO,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;IAChD,CAAC"} \ No newline at end of file +{"version":3,"file":"queued_processes.js","sourceRoot":"","sources":["../../src/collections/queued_processes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAOtD,MAAM,OAAO,eAAgB,SAAQ,cAAc;IACvC,MAAM,CAAC,eAAe,GAAG,WAAW,CAAC;IACrC,MAAM,CAAC,uBAAuB,GAAG,SAAS,CAAC;IAC3C,MAAM,CAAC,SAAS,GAAG,yCAAyC,CAAC;IAC7D,MAAM,CAAC,YAAY,GAAG,aAAa,CAAC;IAE9C,IAAI,CACF,cAAqC;QAErC,OAAO,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;IACrC,CAAC;IAED,GAAG,CACD,UAA2B,EAC3B,cAA2B;QAE3B,OAAO,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;IAChD,CAAC"} \ No newline at end of file diff --git a/dist/collections/screenshots.d.ts b/dist/collections/screenshots.d.ts index 05342061..48ac7397 100644 --- a/dist/collections/screenshots.d.ts +++ b/dist/collections/screenshots.d.ts @@ -1,16 +1,9 @@ import { BaseCollection } from "./base_collection.js"; import { Screenshot } from "../models/screenshot.js"; import { PaginatedResult } from "../interfaces/paginated_result.js"; -import { ProjectWithPagination } from "../interfaces/project_with_pagination.js"; -import { ProjectOnly } from "../interfaces/project_only.js"; import { BulkResult } from "../interfaces/bulk_result.js"; -import { CreateScreenshotParams } from "../types/create_screenshot_params.js"; -import { UpdateScreenshotParams } from "../types/update_screenshot_params.js"; -type ScreenshotDeleted = { - project_id: string; - screenshot_deleted: boolean; - branch?: string; -}; +import type { ProjectWithPagination, ProjectOnly } from "../types/common_get_params.js"; +import type { CreateScreenshotParams, UpdateScreenshotParams, ScreenshotDeleted } from "../types/screenshots.js"; export declare class Screenshots extends BaseCollection { protected static rootElementName: string; protected static rootElementNameSingular: string; @@ -22,4 +15,3 @@ export declare class Screenshots extends BaseCollection { update(screenshot_id: string | number, screenshot_params: UpdateScreenshotParams, request_params: ProjectOnly): Promise; delete(screenshot_id: string | number, request_params: ProjectOnly): Promise; } -export {}; diff --git a/dist/collections/screenshots.js.map b/dist/collections/screenshots.js.map index 03df1dc7..8ef62964 100644 --- a/dist/collections/screenshots.js.map +++ b/dist/collections/screenshots.js.map @@ -1 +1 @@ -{"version":3,"file":"screenshots.js","sourceRoot":"","sources":["../../src/collections/screenshots.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAcrD,MAAM,OAAO,WAAY,SAAQ,cAAc;IACnC,MAAM,CAAC,eAAe,GAAG,aAAa,CAAC;IACvC,MAAM,CAAC,uBAAuB,GAAG,YAAY,CAAC;IAC9C,MAAM,CAAC,SAAS,GAAG,2CAA2C,CAAC;IAC/D,MAAM,CAAC,YAAY,GAAW,UAAU,CAAC;IAEnD,IAAI,CACF,cAAqC;QAErC,OAAO,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;IACrC,CAAC;IAED,MAAM,CACJ,QAA2D,EAC3D,cAA2B;QAE3B,MAAM,IAAI,GAAG,EAAE,WAAW,EAAE,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;QACxD,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,yBAAyB,CAAC,CAAC;IAC7E,CAAC;IAED,GAAG,CACD,YAA6B,EAC7B,cAA2B;QAE3B,OAAO,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,cAAc,CAAC,CAAC;IAClD,CAAC;IAED,MAAM,CACJ,aAA8B,EAC9B,iBAAyC,EACzC,cAA2B;QAE3B,OAAO,IAAI,CAAC,QAAQ,CAAC,aAAa,EAAE,iBAAiB,EAAE,cAAc,CAAC,CAAC;IACzE,CAAC;IAED,MAAM,CACJ,aAA8B,EAC9B,cAA2B;QAE3B,OAAO,IAAI,CAAC,QAAQ,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC;IACtD,CAAC"} \ No newline at end of file +{"version":3,"file":"screenshots.js","sourceRoot":"","sources":["../../src/collections/screenshots.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAarD,MAAM,OAAO,WAAY,SAAQ,cAAc;IACnC,MAAM,CAAC,eAAe,GAAG,aAAa,CAAC;IACvC,MAAM,CAAC,uBAAuB,GAAG,YAAY,CAAC;IAC9C,MAAM,CAAC,SAAS,GAAG,2CAA2C,CAAC;IAC/D,MAAM,CAAC,YAAY,GAAW,UAAU,CAAC;IAEnD,IAAI,CACF,cAAqC;QAErC,OAAO,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;IACrC,CAAC;IAED,MAAM,CACJ,QAA2D,EAC3D,cAA2B;QAE3B,MAAM,IAAI,GAAG,EAAE,WAAW,EAAE,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;QACxD,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,yBAAyB,CAAC,CAAC;IAC7E,CAAC;IAED,GAAG,CACD,YAA6B,EAC7B,cAA2B;QAE3B,OAAO,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,cAAc,CAAC,CAAC;IAClD,CAAC;IAED,MAAM,CACJ,aAA8B,EAC9B,iBAAyC,EACzC,cAA2B;QAE3B,OAAO,IAAI,CAAC,QAAQ,CAAC,aAAa,EAAE,iBAAiB,EAAE,cAAc,CAAC,CAAC;IACzE,CAAC;IAED,MAAM,CACJ,aAA8B,EAC9B,cAA2B;QAE3B,OAAO,IAAI,CAAC,QAAQ,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC;IACtD,CAAC"} \ No newline at end of file diff --git a/dist/collections/segments.d.ts b/dist/collections/segments.d.ts index 6791d221..a757c395 100644 --- a/dist/collections/segments.d.ts +++ b/dist/collections/segments.d.ts @@ -1,24 +1,6 @@ import { Segment } from "../models/segment.js"; import { BaseCollection } from "./base_collection.js"; -import { ProjectOnly } from "../interfaces/project_only.js"; -interface GetSegmentParams extends ProjectOnly { - key_id: number | string; - language_iso: string; - disable_references?: number | string; -} -type UpdateSegmentReqParams = Omit; -type UpdateSegmentBodyParams = { - value: string; - is_fuzzy?: boolean; - is_reviewed?: boolean; - custom_translation_status_ids?: string[] | number[]; -}; -interface ListSegmentParams extends GetSegmentParams { - filter_is_reviewed?: number | string; - filter_unverified?: number | string; - filter_untranslated?: number | string; - filter_qa_issues?: string; -} +import type { GetSegmentParams, UpdateSegmentReqParams, UpdateSegmentBodyParams, ListSegmentParams } from "../types/segments.js"; export declare class Segments extends BaseCollection { protected static rootElementName: string; protected static rootElementNameSingular: string; @@ -28,4 +10,3 @@ export declare class Segments extends BaseCollection { get(segment_number: string | number, request_params: GetSegmentParams): Promise; update(segment_number: string | number, segment_params: UpdateSegmentBodyParams, request_params: UpdateSegmentReqParams): Promise; } -export {}; diff --git a/dist/collections/segments.js.map b/dist/collections/segments.js.map index d437d16f..ce848152 100644 --- a/dist/collections/segments.js.map +++ b/dist/collections/segments.js.map @@ -1 +1 @@ -{"version":3,"file":"segments.js","sourceRoot":"","sources":["../../src/collections/segments.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAyBtD,MAAM,OAAO,QAAS,SAAQ,cAAc;IAChC,MAAM,CAAC,eAAe,GAAG,UAAU,CAAC;IACpC,MAAM,CAAC,uBAAuB,GAAG,SAAS,CAAC;IAC3C,MAAM,CAAC,SAAS,GACxB,yEAAyE,CAAC;IAClE,MAAM,CAAC,YAAY,GAAG,OAAO,CAAC;IAExC,IAAI,CAAC,cAAiC;QACpC,OAAO,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;IACrC,CAAC;IAED,GAAG,CACD,cAA+B,EAC/B,cAAgC;QAEhC,OAAO,IAAI,CAAC,KAAK,CAAC,cAAc,EAAE,cAAc,CAAC,CAAC;IACpD,CAAC;IAED,MAAM,CACJ,cAA+B,EAC/B,cAAuC,EACvC,cAAsC;QAEtC,OAAO,IAAI,CAAC,QAAQ,CAAC,cAAc,EAAE,cAAc,EAAE,cAAc,CAAC,CAAC;IACvE,CAAC"} \ No newline at end of file +{"version":3,"file":"segments.js","sourceRoot":"","sources":["../../src/collections/segments.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAQtD,MAAM,OAAO,QAAS,SAAQ,cAAc;IAChC,MAAM,CAAC,eAAe,GAAG,UAAU,CAAC;IACpC,MAAM,CAAC,uBAAuB,GAAG,SAAS,CAAC;IAC3C,MAAM,CAAC,SAAS,GACxB,yEAAyE,CAAC;IAClE,MAAM,CAAC,YAAY,GAAG,OAAO,CAAC;IAExC,IAAI,CAAC,cAAiC;QACpC,OAAO,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;IACrC,CAAC;IAED,GAAG,CACD,cAA+B,EAC/B,cAAgC;QAEhC,OAAO,IAAI,CAAC,KAAK,CAAC,cAAc,EAAE,cAAc,CAAC,CAAC;IACpD,CAAC;IAED,MAAM,CACJ,cAA+B,EAC/B,cAAuC,EACvC,cAAsC;QAEtC,OAAO,IAAI,CAAC,QAAQ,CAAC,cAAc,EAAE,cAAc,EAAE,cAAc,CAAC,CAAC;IACvE,CAAC"} \ No newline at end of file diff --git a/dist/collections/snapshots.d.ts b/dist/collections/snapshots.d.ts index 15ee03e2..6f5f8468 100644 --- a/dist/collections/snapshots.d.ts +++ b/dist/collections/snapshots.d.ts @@ -1,15 +1,9 @@ import { BaseCollection } from "./base_collection.js"; import { Snapshot } from "../models/snapshot.js"; import { PaginatedResult } from "../interfaces/paginated_result.js"; -import { ProjectWithPagination } from "../interfaces/project_with_pagination.js"; -import { ProjectOnly } from "../interfaces/project_only.js"; import { Project } from "../models/project.js"; -import { CreateSnapshotParams } from "../types/create_snapshot_params.js"; -type SnapshotDeleted = { - project_id: string; - snapshot_deleted: boolean; - branch?: string; -}; +import type { ProjectOnly, ProjectWithPagination } from "../types/common_get_params.js"; +import type { CreateSnapshotParams, SnapshotDeleted } from "../types/snapshots.js"; export declare class Snapshots extends BaseCollection { protected static rootElementName: string; protected static rootElementNameSingular: string; @@ -20,4 +14,3 @@ export declare class Snapshots extends BaseCollection { restore(snapshot_id: string | number, request_params: ProjectOnly): Promise; delete(snapshot_id: string | number, request_params: ProjectOnly): Promise; } -export {}; diff --git a/dist/collections/snapshots.js.map b/dist/collections/snapshots.js.map index 33319624..453dd897 100644 --- a/dist/collections/snapshots.js.map +++ b/dist/collections/snapshots.js.map @@ -1 +1 @@ -{"version":3,"file":"snapshots.js","sourceRoot":"","sources":["../../src/collections/snapshots.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAajD,MAAM,OAAO,SAAU,SAAQ,cAAc;IACjC,MAAM,CAAC,eAAe,GAAG,WAAW,CAAC;IACrC,MAAM,CAAC,uBAAuB,GAAG,UAAU,CAAC;IAC5C,MAAM,CAAC,SAAS,GAAG,yCAAyC,CAAC;IAC7D,MAAM,CAAC,YAAY,GAAG,QAAQ,CAAC;IAEzC,IAAI,CACF,cAAqC;QAErC,OAAO,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;IACrC,CAAC;IAED,MAAM,CACJ,eAAqC,EACrC,cAA2B;QAE3B,OAAO,IAAI,CAAC,QAAQ,CAClB,eAAe,EACf,cAAc,EACd,IAAI,CAAC,0BAA0B,CAChC,CAAC;IACJ,CAAC;IAED,OAAO,CACL,WAA4B,EAC5B,cAA2B;QAE3B,MAAM,MAAM,GAAG;YACb,GAAG,cAAc;YACjB,GAAG,EAAE,EAAE,EAAE,WAAW,EAAE;SACvB,CAAC;QAEF,OAAO,IAAI,CAAC,aAAa,CACvB,MAAM,EACN,MAAM,EACN,IAAI,CAAC,cAAc,EACnB,IAAI,CAAC,YAAY,EACjB,EAAE,CACH,CAAC;IACJ,CAAC;IAED,MAAM,CACJ,WAA4B,EAC5B,cAA2B;QAE3B,OAAO,IAAI,CAAC,QAAQ,CAAC,WAAW,EAAE,cAAc,CAAC,CAAC;IACpD,CAAC"} \ No newline at end of file +{"version":3,"file":"snapshots.js","sourceRoot":"","sources":["../../src/collections/snapshots.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAYjD,MAAM,OAAO,SAAU,SAAQ,cAAc;IACjC,MAAM,CAAC,eAAe,GAAG,WAAW,CAAC;IACrC,MAAM,CAAC,uBAAuB,GAAG,UAAU,CAAC;IAC5C,MAAM,CAAC,SAAS,GAAG,yCAAyC,CAAC;IAC7D,MAAM,CAAC,YAAY,GAAG,QAAQ,CAAC;IAEzC,IAAI,CACF,cAAqC;QAErC,OAAO,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;IACrC,CAAC;IAED,MAAM,CACJ,eAAqC,EACrC,cAA2B;QAE3B,OAAO,IAAI,CAAC,QAAQ,CAClB,eAAe,EACf,cAAc,EACd,IAAI,CAAC,0BAA0B,CAChC,CAAC;IACJ,CAAC;IAED,OAAO,CACL,WAA4B,EAC5B,cAA2B;QAE3B,MAAM,MAAM,GAAG;YACb,GAAG,cAAc;YACjB,GAAG,EAAE,EAAE,EAAE,WAAW,EAAE;SACvB,CAAC;QAEF,OAAO,IAAI,CAAC,aAAa,CACvB,MAAM,EACN,MAAM,EACN,IAAI,CAAC,cAAc,EACnB,IAAI,CAAC,YAAY,EACjB,EAAE,CACH,CAAC;IACJ,CAAC;IAED,MAAM,CACJ,WAA4B,EAC5B,cAA2B;QAE3B,OAAO,IAAI,CAAC,QAAQ,CAAC,WAAW,EAAE,cAAc,CAAC,CAAC;IACpD,CAAC"} \ No newline at end of file diff --git a/dist/collections/tasks.d.ts b/dist/collections/tasks.d.ts index ac41b420..2cf81746 100644 --- a/dist/collections/tasks.d.ts +++ b/dist/collections/tasks.d.ts @@ -1,19 +1,8 @@ import { BaseCollection } from "./base_collection.js"; import { Task } from "../models/task.js"; import { PaginatedResult } from "../interfaces/paginated_result.js"; -import { ProjectWithPagination } from "../interfaces/project_with_pagination.js"; -import { ProjectOnly } from "../interfaces/project_only.js"; -import { CreateTaskParams } from "../types/create_task_params.js"; -import { UpdateTaskParams } from "../types/update_task_params.js"; -interface ListTaskParams extends ProjectWithPagination { - filter_title?: string; - filter_statuses?: string; -} -type TaskDeleted = { - project_id: string; - task_deleted: boolean; - branch?: string; -}; +import type { ProjectOnly } from "../types/common_get_params.js"; +import type { CreateTaskParams, UpdateTaskParams, TaskDeleted, ListTaskParams } from "../types/tasks.js"; export declare class Tasks extends BaseCollection { protected static rootElementName: string; protected static rootElementNameSingular: string; @@ -25,4 +14,3 @@ export declare class Tasks extends BaseCollection { update(task_id: string | number, task_params: UpdateTaskParams, request_params: ProjectOnly): Promise; delete(task_id: string | number, request_params: ProjectOnly): Promise; } -export {}; diff --git a/dist/collections/tasks.js.map b/dist/collections/tasks.js.map index 79903d49..7087fa04 100644 --- a/dist/collections/tasks.js.map +++ b/dist/collections/tasks.js.map @@ -1 +1 @@ -{"version":3,"file":"tasks.js","sourceRoot":"","sources":["../../src/collections/tasks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAkBzC,MAAM,OAAO,KAAM,SAAQ,cAAc;IAC7B,MAAM,CAAC,eAAe,GAAG,OAAO,CAAC;IACjC,MAAM,CAAC,uBAAuB,GAAG,MAAM,CAAC;IACxC,MAAM,CAAC,SAAS,GAAG,qCAAqC,CAAC;IACzD,MAAM,CAAC,YAAY,GAAG,IAAI,CAAC;IAErC,IAAI,CAAC,cAA8B;QACjC,OAAO,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;IACrC,CAAC;IAED,MAAM,CACJ,WAA6B,EAC7B,cAA2B;QAE3B,OAAO,IAAI,CAAC,QAAQ,CAClB,WAAW,EACX,cAAc,EACd,IAAI,CAAC,0BAA0B,CAChC,CAAC;IACJ,CAAC;IAED,GAAG,CAAC,OAAwB,EAAE,cAA2B;QACvD,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;IAC7C,CAAC;IAED,MAAM,CACJ,OAAwB,EACxB,WAA6B,EAC7B,cAA2B;QAE3B,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,WAAW,EAAE,cAAc,CAAC,CAAC;IAC7D,CAAC;IAED,MAAM,CACJ,OAAwB,EACxB,cAA2B;QAE3B,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;IAChD,CAAC"} \ No newline at end of file +{"version":3,"file":"tasks.js","sourceRoot":"","sources":["../../src/collections/tasks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAUzC,MAAM,OAAO,KAAM,SAAQ,cAAc;IAC7B,MAAM,CAAC,eAAe,GAAG,OAAO,CAAC;IACjC,MAAM,CAAC,uBAAuB,GAAG,MAAM,CAAC;IACxC,MAAM,CAAC,SAAS,GAAG,qCAAqC,CAAC;IACzD,MAAM,CAAC,YAAY,GAAG,IAAI,CAAC;IAErC,IAAI,CAAC,cAA8B;QACjC,OAAO,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;IACrC,CAAC;IAED,MAAM,CACJ,WAA6B,EAC7B,cAA2B;QAE3B,OAAO,IAAI,CAAC,QAAQ,CAClB,WAAW,EACX,cAAc,EACd,IAAI,CAAC,0BAA0B,CAChC,CAAC;IACJ,CAAC;IAED,GAAG,CAAC,OAAwB,EAAE,cAA2B;QACvD,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;IAC7C,CAAC;IAED,MAAM,CACJ,OAAwB,EACxB,WAA6B,EAC7B,cAA2B;QAE3B,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,WAAW,EAAE,cAAc,CAAC,CAAC;IAC7D,CAAC;IAED,MAAM,CACJ,OAAwB,EACxB,cAA2B;QAE3B,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;IAChD,CAAC"} \ No newline at end of file diff --git a/dist/collections/team_user_billing_details.d.ts b/dist/collections/team_user_billing_details.d.ts index fbf72825..84aeafc6 100644 --- a/dist/collections/team_user_billing_details.d.ts +++ b/dist/collections/team_user_billing_details.d.ts @@ -1,7 +1,7 @@ import { TeamUserBillingDetails as BillingDetailsModel } from "../models/team_user_billing_details.js"; import { BaseCollection } from "./base_collection.js"; -import { TeamOnly } from "../interfaces/team_only.js"; -import { BillingDetailsParams } from "../types/billing_details_params.js"; +import type { TeamOnly } from "../types/common_get_params.js"; +import type { BillingDetailsParams } from "../types/billing_details.js"; export declare class TeamUserBillingDetails extends BaseCollection { protected static rootElementName: string; protected static prefixURI: string; diff --git a/dist/collections/team_users.d.ts b/dist/collections/team_users.d.ts index 4958c71c..2f9000f2 100644 --- a/dist/collections/team_users.d.ts +++ b/dist/collections/team_users.d.ts @@ -1,13 +1,9 @@ import { BaseCollection } from "./base_collection.js"; import { TeamUser } from "../models/team_user.js"; -import { TeamWithPagination } from "../interfaces/team_with_pagination.js"; import { PaginatedResult } from "../interfaces/paginated_result.js"; -import { TeamOnly } from "../interfaces/team_only.js"; -import { TeamUserParams } from "../types/team_user_params.js"; -type TeamUserDeleted = { - team_id: string; - team_user_deleted: boolean; -}; +import type { TeamWithPagination } from "../types/teams.js"; +import type { TeamOnly } from "../types/common_get_params.js"; +import type { TeamUserParams, TeamUserDeleted } from "../types/team_users.js"; export declare class TeamUsers extends BaseCollection { protected static rootElementName: string; protected static rootElementNameSingular: string; @@ -18,4 +14,3 @@ export declare class TeamUsers extends BaseCollection { update(team_user_id: string | number, team_user_params: TeamUserParams, request_params: TeamOnly): Promise; delete(team_user_id: string | number, request_params: TeamOnly): Promise; } -export {}; diff --git a/dist/collections/team_users.js.map b/dist/collections/team_users.js.map index d4a114f1..ebf5700e 100644 --- a/dist/collections/team_users.js.map +++ b/dist/collections/team_users.js.map @@ -1 +1 @@ -{"version":3,"file":"team_users.js","sourceRoot":"","sources":["../../src/collections/team_users.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAWlD,MAAM,OAAO,SAAU,SAAQ,cAAc;IACjC,MAAM,CAAC,eAAe,GAAG,YAAY,CAAC;IACtC,MAAM,CAAC,uBAAuB,GAAG,WAAW,CAAC;IAC7C,MAAM,CAAC,SAAS,GAAG,+BAA+B,CAAC;IACnD,MAAM,CAAC,YAAY,GAAG,QAAQ,CAAC;IAEzC,IAAI,CAAC,cAAkC;QACrC,OAAO,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;IACrC,CAAC;IAED,GAAG,CACD,YAA6B,EAC7B,cAAwB;QAExB,OAAO,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,cAAc,CAAC,CAAC;IAClD,CAAC;IAED,MAAM,CACJ,YAA6B,EAC7B,gBAAgC,EAChC,cAAwB;QAExB,OAAO,IAAI,CAAC,QAAQ,CAAC,YAAY,EAAE,gBAAgB,EAAE,cAAc,CAAC,CAAC;IACvE,CAAC;IAED,MAAM,CACJ,YAA6B,EAC7B,cAAwB;QAExB,OAAO,IAAI,CAAC,QAAQ,CAAC,YAAY,EAAE,cAAc,CAAC,CAAC;IACrD,CAAC"} \ No newline at end of file +{"version":3,"file":"team_users.js","sourceRoot":"","sources":["../../src/collections/team_users.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAMlD,MAAM,OAAO,SAAU,SAAQ,cAAc;IACjC,MAAM,CAAC,eAAe,GAAG,YAAY,CAAC;IACtC,MAAM,CAAC,uBAAuB,GAAG,WAAW,CAAC;IAC7C,MAAM,CAAC,SAAS,GAAG,+BAA+B,CAAC;IACnD,MAAM,CAAC,YAAY,GAAG,QAAQ,CAAC;IAEzC,IAAI,CAAC,cAAkC;QACrC,OAAO,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;IACrC,CAAC;IAED,GAAG,CACD,YAA6B,EAC7B,cAAwB;QAExB,OAAO,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,cAAc,CAAC,CAAC;IAClD,CAAC;IAED,MAAM,CACJ,YAA6B,EAC7B,gBAAgC,EAChC,cAAwB;QAExB,OAAO,IAAI,CAAC,QAAQ,CAAC,YAAY,EAAE,gBAAgB,EAAE,cAAc,CAAC,CAAC;IACvE,CAAC;IAED,MAAM,CACJ,YAA6B,EAC7B,cAAwB;QAExB,OAAO,IAAI,CAAC,QAAQ,CAAC,YAAY,EAAE,cAAc,CAAC,CAAC;IACrD,CAAC"} \ No newline at end of file diff --git a/dist/collections/teams.d.ts b/dist/collections/teams.d.ts index f6dbba78..8e86d618 100644 --- a/dist/collections/teams.d.ts +++ b/dist/collections/teams.d.ts @@ -1,7 +1,7 @@ import { BaseCollection } from "./base_collection.js"; import { Team } from "../models/team.js"; -import { PaginationParams } from "../interfaces/pagination_params.js"; import { PaginatedResult } from "../interfaces/paginated_result.js"; +import type { PaginationParams } from "../types/common_get_params.js"; export declare class Teams extends BaseCollection { protected static rootElementName: string; protected static prefixURI: string; diff --git a/dist/collections/translation_providers.d.ts b/dist/collections/translation_providers.d.ts index 5f382d87..edf4c2d7 100644 --- a/dist/collections/translation_providers.d.ts +++ b/dist/collections/translation_providers.d.ts @@ -1,8 +1,8 @@ import { BaseCollection } from "./base_collection.js"; import { TranslationProvider } from "../models/translation_provider.js"; -import { TeamWithPagination } from "../interfaces/team_with_pagination.js"; import { PaginatedResult } from "../interfaces/paginated_result.js"; -import { TeamOnly } from "../interfaces/team_only.js"; +import type { TeamOnly } from "../types/common_get_params.js"; +import type { TeamWithPagination } from "../types/teams.js"; export declare class TranslationProviders extends BaseCollection { protected static rootElementName: string; protected static prefixURI: string; diff --git a/dist/collections/translation_statuses.d.ts b/dist/collections/translation_statuses.d.ts index 98d1dde5..67fc7746 100644 --- a/dist/collections/translation_statuses.d.ts +++ b/dist/collections/translation_statuses.d.ts @@ -1,18 +1,8 @@ import { BaseCollection } from "./base_collection.js"; import { TranslationStatus } from "../models/translation_status.js"; import { PaginatedResult } from "../interfaces/paginated_result.js"; -import { ProjectWithPagination } from "../interfaces/project_with_pagination.js"; -import { ProjectOnly } from "../interfaces/project_only.js"; -import { CreateTranslationStatusParams } from "../types/create_translation_status_params.js"; -import { UpdateTranslationStatusParams } from "../types/update_translation_status_params.js"; -type TranslationStatusDeleted = { - project_id: string; - custom_translation_status_deleted: boolean; - branch?: string; -}; -type TranslationStatusColors = { - colors: string[]; -}; +import type { ProjectOnly, ProjectWithPagination } from "../types/common_get_params.js"; +import type { CreateTranslationStatusParams, UpdateTranslationStatusParams, TranslationStatusDeleted, TranslationStatusColors } from "../types/translation_statuses.js"; export declare class TranslationStatuses extends BaseCollection { protected static rootElementName: string; protected static prefixURI: string; @@ -25,4 +15,3 @@ export declare class TranslationStatuses extends BaseCollection { delete(translation_status_id: string | number, request_params: ProjectOnly): Promise; available_colors(request_params: ProjectOnly): Promise; } -export {}; diff --git a/dist/collections/translation_statuses.js.map b/dist/collections/translation_statuses.js.map index 0a630d7b..9ef3de04 100644 --- a/dist/collections/translation_statuses.js.map +++ b/dist/collections/translation_statuses.js.map @@ -1 +1 @@ -{"version":3,"file":"translation_statuses.js","sourceRoot":"","sources":["../../src/collections/translation_statuses.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAiBpE,MAAM,OAAO,mBAAoB,SAAQ,cAAc;IAC3C,MAAM,CAAC,eAAe,GAAG,6BAA6B,CAAC;IACvD,MAAM,CAAC,SAAS,GACxB,2DAA2D,CAAC;IACpD,MAAM,CAAC,YAAY,GAAG,iBAAiB,CAAC;IACxC,MAAM,CAAC,uBAAuB,GAAG,2BAA2B,CAAC;IAEvE,IAAI,CACF,cAAqC;QAErC,OAAO,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;IACrC,CAAC;IAED,MAAM,CACJ,yBAAwD,EACxD,cAA2B;QAE3B,OAAO,IAAI,CAAC,QAAQ,CAClB,yBAAyB,EACzB,cAAc,EACd,IAAI,CAAC,0BAA0B,CAChC,CAAC;IACJ,CAAC;IAED,GAAG,CACD,qBAAsC,EACtC,cAA2B;QAE3B,OAAO,IAAI,CAAC,KAAK,CAAC,qBAAqB,EAAE,cAAc,CAAC,CAAC;IAC3D,CAAC;IAED,MAAM,CACJ,qBAAsC,EACtC,yBAAwD,EACxD,cAA2B;QAE3B,OAAO,IAAI,CAAC,QAAQ,CAClB,qBAAqB,EACrB,yBAAyB,EACzB,cAAc,CACf,CAAC;IACJ,CAAC;IAED,MAAM,CACJ,qBAAsC,EACtC,cAA2B;QAE3B,OAAO,IAAI,CAAC,QAAQ,CAAC,qBAAqB,EAAE,cAAc,CAAC,CAAC;IAC9D,CAAC;IAED,gBAAgB,CACd,cAA2B;QAE3B,OAAO,IAAI,CAAC,aAAa,CACvB,KAAK,EACL,cAAc,EACd,IAAI,CAAC,cAAc,EACnB,IAAI,CAAC,YAAY,EACjB,EAAE,EACF,4DAA4D,CAC7D,CAAC;IACJ,CAAC"} \ No newline at end of file +{"version":3,"file":"translation_statuses.js","sourceRoot":"","sources":["../../src/collections/translation_statuses.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAapE,MAAM,OAAO,mBAAoB,SAAQ,cAAc;IAC3C,MAAM,CAAC,eAAe,GAAG,6BAA6B,CAAC;IACvD,MAAM,CAAC,SAAS,GACxB,2DAA2D,CAAC;IACpD,MAAM,CAAC,YAAY,GAAG,iBAAiB,CAAC;IACxC,MAAM,CAAC,uBAAuB,GAAG,2BAA2B,CAAC;IAEvE,IAAI,CACF,cAAqC;QAErC,OAAO,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;IACrC,CAAC;IAED,MAAM,CACJ,yBAAwD,EACxD,cAA2B;QAE3B,OAAO,IAAI,CAAC,QAAQ,CAClB,yBAAyB,EACzB,cAAc,EACd,IAAI,CAAC,0BAA0B,CAChC,CAAC;IACJ,CAAC;IAED,GAAG,CACD,qBAAsC,EACtC,cAA2B;QAE3B,OAAO,IAAI,CAAC,KAAK,CAAC,qBAAqB,EAAE,cAAc,CAAC,CAAC;IAC3D,CAAC;IAED,MAAM,CACJ,qBAAsC,EACtC,yBAAwD,EACxD,cAA2B;QAE3B,OAAO,IAAI,CAAC,QAAQ,CAClB,qBAAqB,EACrB,yBAAyB,EACzB,cAAc,CACf,CAAC;IACJ,CAAC;IAED,MAAM,CACJ,qBAAsC,EACtC,cAA2B;QAE3B,OAAO,IAAI,CAAC,QAAQ,CAAC,qBAAqB,EAAE,cAAc,CAAC,CAAC;IAC9D,CAAC;IAED,gBAAgB,CACd,cAA2B;QAE3B,OAAO,IAAI,CAAC,aAAa,CACvB,KAAK,EACL,cAAc,EACd,IAAI,CAAC,cAAc,EACnB,IAAI,CAAC,YAAY,EACjB,EAAE,EACF,4DAA4D,CAC7D,CAAC;IACJ,CAAC"} \ No newline at end of file diff --git a/dist/collections/translations.d.ts b/dist/collections/translations.d.ts index dd246019..91ab424c 100644 --- a/dist/collections/translations.d.ts +++ b/dist/collections/translations.d.ts @@ -1,21 +1,8 @@ import { BaseCollection } from "./base_collection.js"; import { Translation } from "../models/translation.js"; import { PaginatedResult } from "../interfaces/paginated_result.js"; -import { ProjectWithPagination } from "../interfaces/project_with_pagination.js"; -import { ProjectOnly } from "../interfaces/project_only.js"; -import { UpdateTranslationParams } from "../types/update_translation_params.js"; -interface ListTranslationParams extends ProjectWithPagination { - disable_references?: number | string; - filter_lang_id?: number | string; - filter_is_reviewed?: number | string; - filter_unverified?: number | string; - filter_untranslated?: number | string; - filter_qa_issues?: string; - filter_active_task_id?: number | string; -} -interface GetTranslationParams extends ProjectOnly { - disable_references?: number | string; -} +import type { ProjectOnly } from "../types/common_get_params.js"; +import type { UpdateTranslationParams, ListTranslationParams, GetTranslationParams } from "../types/translations.js"; export declare class Translations extends BaseCollection { protected static rootElementName: string; protected static rootElementNameSingular: string; @@ -25,4 +12,3 @@ export declare class Translations extends BaseCollection { get(translation_id: string | number, request_params: GetTranslationParams): Promise; update(translation_id: string | number, translation_params: UpdateTranslationParams, request_params: ProjectOnly): Promise; } -export {}; diff --git a/dist/collections/translations.js.map b/dist/collections/translations.js.map index 7de0e77d..62f1b9b2 100644 --- a/dist/collections/translations.js.map +++ b/dist/collections/translations.js.map @@ -1 +1 @@ -{"version":3,"file":"translations.js","sourceRoot":"","sources":["../../src/collections/translations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAoBvD,MAAM,OAAO,YAAa,SAAQ,cAAc;IACpC,MAAM,CAAC,eAAe,GAAG,cAAc,CAAC;IACxC,MAAM,CAAC,uBAAuB,GAAG,aAAa,CAAC;IAC/C,MAAM,CAAC,SAAS,GAAG,4CAA4C,CAAC;IAChE,MAAM,CAAC,YAAY,GAAG,WAAW,CAAC;IAE5C,IAAI,CACF,cAAqC;QAErC,OAAO,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;IACrC,CAAC;IAED,GAAG,CACD,cAA+B,EAC/B,cAAoC;QAEpC,OAAO,IAAI,CAAC,KAAK,CAAC,cAAc,EAAE,cAAc,CAAC,CAAC;IACpD,CAAC;IAED,MAAM,CACJ,cAA+B,EAC/B,kBAA2C,EAC3C,cAA2B;QAE3B,OAAO,IAAI,CAAC,QAAQ,CAAC,cAAc,EAAE,kBAAkB,EAAE,cAAc,CAAC,CAAC;IAC3E,CAAC"} \ No newline at end of file +{"version":3,"file":"translations.js","sourceRoot":"","sources":["../../src/collections/translations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AASvD,MAAM,OAAO,YAAa,SAAQ,cAAc;IACpC,MAAM,CAAC,eAAe,GAAG,cAAc,CAAC;IACxC,MAAM,CAAC,uBAAuB,GAAG,aAAa,CAAC;IAC/C,MAAM,CAAC,SAAS,GAAG,4CAA4C,CAAC;IAChE,MAAM,CAAC,YAAY,GAAG,WAAW,CAAC;IAE5C,IAAI,CACF,cAAqC;QAErC,OAAO,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;IACrC,CAAC;IAED,GAAG,CACD,cAA+B,EAC/B,cAAoC;QAEpC,OAAO,IAAI,CAAC,KAAK,CAAC,cAAc,EAAE,cAAc,CAAC,CAAC;IACpD,CAAC;IAED,MAAM,CACJ,cAA+B,EAC/B,kBAA2C,EAC3C,cAA2B;QAE3B,OAAO,IAAI,CAAC,QAAQ,CAAC,cAAc,EAAE,kBAAkB,EAAE,cAAc,CAAC,CAAC;IAC3E,CAAC"} \ No newline at end of file diff --git a/dist/collections/user_groups.d.ts b/dist/collections/user_groups.d.ts index fea17d3a..e3a5dc3e 100644 --- a/dist/collections/user_groups.d.ts +++ b/dist/collections/user_groups.d.ts @@ -1,14 +1,10 @@ import { BaseCollection } from "./base_collection.js"; import { UserGroup } from "../models/user_group.js"; import { Keyable } from "../interfaces/keyable.js"; -import { TeamWithPagination } from "../interfaces/team_with_pagination.js"; import { PaginatedResult } from "../interfaces/paginated_result.js"; -import { TeamOnly } from "../interfaces/team_only.js"; -import { UserGroupParams } from "../types/user_group_params.js"; -type UserGroupDeleted = { - team_id: string; - group_deleted: boolean; -}; +import type { TeamWithPagination } from "../types/teams.js"; +import type { TeamOnly } from "../types/common_get_params.js"; +import type { UserGroupParams, UserGroupDeleted } from "../types/user_groups.js"; export declare class UserGroups extends BaseCollection { protected static rootElementName: string; protected static prefixURI: string; @@ -24,4 +20,3 @@ export declare class UserGroups extends BaseCollection { remove_projects_from_group(team_id: string | number, group_id: string | number, project_ids: string[] | number[]): Promise; protected populateGroupFromJsonRoot(json: Keyable, headers: Headers): this; } -export {}; diff --git a/dist/collections/user_groups.js.map b/dist/collections/user_groups.js.map index d8365fd5..68fda650 100644 --- a/dist/collections/user_groups.js.map +++ b/dist/collections/user_groups.js.map @@ -1 +1 @@ -{"version":3,"file":"user_groups.js","sourceRoot":"","sources":["../../src/collections/user_groups.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAYpD,MAAM,OAAO,UAAW,SAAQ,cAAc;IAClC,MAAM,CAAC,eAAe,GAAG,aAAa,CAAC;IACvC,MAAM,CAAC,SAAS,GAAG,gCAAgC,CAAC;IACpD,MAAM,CAAC,YAAY,GAAG,SAAS,CAAC;IAE1C,IAAI,CACF,cAAkC;QAElC,OAAO,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;IACrC,CAAC;IAED,MAAM,CACJ,iBAAkC,EAClC,cAAwB;QAExB,OAAO,IAAI,CAAC,QAAQ,CAClB,iBAAiB,EACjB,cAAc,EACd,IAAI,CAAC,yBAAyB,CAC/B,CAAC;IACJ,CAAC;IAED,GAAG,CACD,aAA8B,EAC9B,cAAwB;QAExB,OAAO,IAAI,CAAC,KAAK,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC;IACnD,CAAC;IAED,MAAM,CACJ,aAA8B,EAC9B,iBAAkC,EAClC,cAAwB;QAExB,OAAO,IAAI,CAAC,QAAQ,CAClB,aAAa,EACb,iBAAiB,EACjB,cAAc,EACd,IAAI,CAAC,yBAAyB,CAC/B,CAAC;IACJ,CAAC;IAED,MAAM,CACJ,aAA8B,EAC9B,cAAwB;QAExB,OAAO,IAAI,CAAC,QAAQ,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC;IACtD,CAAC;IAED,oBAAoB,CAClB,OAAwB,EACxB,QAAyB,EACzB,QAA6B;QAE7B,MAAM,MAAM,GAAG;YACb,OAAO,EAAE,OAAO;YAChB,QAAQ,EAAE,QAAQ;SACnB,CAAC;QACF,MAAM,IAAI,GAAG,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;QACjC,OAAO,IAAI,CAAC,aAAa,CACvB,KAAK,EACL,MAAM,EACN,IAAI,CAAC,yBAAyB,EAC9B,IAAI,CAAC,YAAY,EACjB,IAAI,EACJ,mDAAmD,CACpD,CAAC;IACJ,CAAC;IAED,yBAAyB,CACvB,OAAwB,EACxB,QAAyB,EACzB,QAA6B;QAE7B,MAAM,MAAM,GAAG;YACb,OAAO,EAAE,OAAO;YAChB,QAAQ,EAAE,QAAQ;SACnB,CAAC;QACF,MAAM,IAAI,GAAG,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;QACjC,OAAO,IAAI,CAAC,aAAa,CACvB,KAAK,EACL,MAAM,EACN,IAAI,CAAC,yBAAyB,EAC9B,IAAI,CAAC,YAAY,EACjB,IAAI,EACJ,sDAAsD,CACvD,CAAC;IACJ,CAAC;IAED,qBAAqB,CACnB,OAAwB,EACxB,QAAyB,EACzB,WAAgC;QAEhC,MAAM,MAAM,GAAG;YACb,OAAO,EAAE,OAAO;YAChB,QAAQ,EAAE,QAAQ;SACnB,CAAC;QACF,MAAM,IAAI,GAAG,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC;QACvC,OAAO,IAAI,CAAC,aAAa,CACvB,KAAK,EACL,MAAM,EACN,IAAI,CAAC,yBAAyB,EAC9B,IAAI,CAAC,YAAY,EACjB,IAAI,EACJ,oDAAoD,CACrD,CAAC;IACJ,CAAC;IAED,0BAA0B,CACxB,OAAwB,EACxB,QAAyB,EACzB,WAAgC;QAEhC,MAAM,MAAM,GAAG;YACb,OAAO,EAAE,OAAO;YAChB,QAAQ,EAAE,QAAQ;SACnB,CAAC;QACF,MAAM,IAAI,GAAG,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC;QACvC,OAAO,IAAI,CAAC,aAAa,CACvB,KAAK,EACL,MAAM,EACN,IAAI,CAAC,yBAAyB,EAC9B,IAAI,CAAC,YAAY,EACjB,IAAI,EACJ,uDAAuD,CACxD,CAAC;IACJ,CAAC;IAES,yBAAyB,CAAC,IAAa,EAAE,OAAgB;QACjE,MAAM,cAAc,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC;QACrC,OAAa,IAAI,CAAC,sBAAsB,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;IACpE,CAAC"} \ No newline at end of file +{"version":3,"file":"user_groups.js","sourceRoot":"","sources":["../../src/collections/user_groups.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAUpD,MAAM,OAAO,UAAW,SAAQ,cAAc;IAClC,MAAM,CAAC,eAAe,GAAG,aAAa,CAAC;IACvC,MAAM,CAAC,SAAS,GAAG,gCAAgC,CAAC;IACpD,MAAM,CAAC,YAAY,GAAG,SAAS,CAAC;IAE1C,IAAI,CACF,cAAkC;QAElC,OAAO,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;IACrC,CAAC;IAED,MAAM,CACJ,iBAAkC,EAClC,cAAwB;QAExB,OAAO,IAAI,CAAC,QAAQ,CAClB,iBAAiB,EACjB,cAAc,EACd,IAAI,CAAC,yBAAyB,CAC/B,CAAC;IACJ,CAAC;IAED,GAAG,CACD,aAA8B,EAC9B,cAAwB;QAExB,OAAO,IAAI,CAAC,KAAK,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC;IACnD,CAAC;IAED,MAAM,CACJ,aAA8B,EAC9B,iBAAkC,EAClC,cAAwB;QAExB,OAAO,IAAI,CAAC,QAAQ,CAClB,aAAa,EACb,iBAAiB,EACjB,cAAc,EACd,IAAI,CAAC,yBAAyB,CAC/B,CAAC;IACJ,CAAC;IAED,MAAM,CACJ,aAA8B,EAC9B,cAAwB;QAExB,OAAO,IAAI,CAAC,QAAQ,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC;IACtD,CAAC;IAED,oBAAoB,CAClB,OAAwB,EACxB,QAAyB,EACzB,QAA6B;QAE7B,MAAM,MAAM,GAAG;YACb,OAAO,EAAE,OAAO;YAChB,QAAQ,EAAE,QAAQ;SACnB,CAAC;QACF,MAAM,IAAI,GAAG,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;QACjC,OAAO,IAAI,CAAC,aAAa,CACvB,KAAK,EACL,MAAM,EACN,IAAI,CAAC,yBAAyB,EAC9B,IAAI,CAAC,YAAY,EACjB,IAAI,EACJ,mDAAmD,CACpD,CAAC;IACJ,CAAC;IAED,yBAAyB,CACvB,OAAwB,EACxB,QAAyB,EACzB,QAA6B;QAE7B,MAAM,MAAM,GAAG;YACb,OAAO,EAAE,OAAO;YAChB,QAAQ,EAAE,QAAQ;SACnB,CAAC;QACF,MAAM,IAAI,GAAG,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;QACjC,OAAO,IAAI,CAAC,aAAa,CACvB,KAAK,EACL,MAAM,EACN,IAAI,CAAC,yBAAyB,EAC9B,IAAI,CAAC,YAAY,EACjB,IAAI,EACJ,sDAAsD,CACvD,CAAC;IACJ,CAAC;IAED,qBAAqB,CACnB,OAAwB,EACxB,QAAyB,EACzB,WAAgC;QAEhC,MAAM,MAAM,GAAG;YACb,OAAO,EAAE,OAAO;YAChB,QAAQ,EAAE,QAAQ;SACnB,CAAC;QACF,MAAM,IAAI,GAAG,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC;QACvC,OAAO,IAAI,CAAC,aAAa,CACvB,KAAK,EACL,MAAM,EACN,IAAI,CAAC,yBAAyB,EAC9B,IAAI,CAAC,YAAY,EACjB,IAAI,EACJ,oDAAoD,CACrD,CAAC;IACJ,CAAC;IAED,0BAA0B,CACxB,OAAwB,EACxB,QAAyB,EACzB,WAAgC;QAEhC,MAAM,MAAM,GAAG;YACb,OAAO,EAAE,OAAO;YAChB,QAAQ,EAAE,QAAQ;SACnB,CAAC;QACF,MAAM,IAAI,GAAG,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC;QACvC,OAAO,IAAI,CAAC,aAAa,CACvB,KAAK,EACL,MAAM,EACN,IAAI,CAAC,yBAAyB,EAC9B,IAAI,CAAC,YAAY,EACjB,IAAI,EACJ,uDAAuD,CACxD,CAAC;IACJ,CAAC;IAES,yBAAyB,CAAC,IAAa,EAAE,OAAgB;QACjE,MAAM,cAAc,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC;QACrC,OAAa,IAAI,CAAC,sBAAsB,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;IACpE,CAAC"} \ No newline at end of file diff --git a/dist/collections/webhooks.d.ts b/dist/collections/webhooks.d.ts index 1f53fba1..5ae32dba 100644 --- a/dist/collections/webhooks.d.ts +++ b/dist/collections/webhooks.d.ts @@ -1,18 +1,8 @@ import { BaseCollection } from "./base_collection.js"; import { Webhook } from "../models/webhook.js"; import { PaginatedResult } from "../interfaces/paginated_result.js"; -import { ProjectWithPagination } from "../interfaces/project_with_pagination.js"; -import { ProjectOnly } from "../interfaces/project_only.js"; -import { CreateWebhookParams } from "../types/create_webhook_params.js"; -import { UpdateWebhookParams } from "../types/update_webhook_params.js"; -type WebhookDeleted = { - project_id: string; - webhook_deleted: boolean; -}; -type WebhookRegenerated = { - project_id: string; - secret: string; -}; +import type { ProjectWithPagination, ProjectOnly } from "../types/common_get_params.js"; +import type { CreateWebhookParams, UpdateWebhookParams, WebhookDeleted, WebhookRegenerated } from "../types/webhooks.js"; export declare class Webhooks extends BaseCollection { protected static rootElementName: string; protected static rootElementNameSingular: string; @@ -25,4 +15,3 @@ export declare class Webhooks extends BaseCollection { delete(webhook_id: string | number, request_params: ProjectOnly): Promise; regenerate_secret(webhook_id: string | number, request_params: ProjectOnly): Promise; } -export {}; diff --git a/dist/collections/webhooks.js.map b/dist/collections/webhooks.js.map index 3ce34f48..308144e4 100644 --- a/dist/collections/webhooks.js.map +++ b/dist/collections/webhooks.js.map @@ -1 +1 @@ -{"version":3,"file":"webhooks.js","sourceRoot":"","sources":["../../src/collections/webhooks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAiB/C,MAAM,OAAO,QAAS,SAAQ,cAAc;IAChC,MAAM,CAAC,eAAe,GAAG,UAAU,CAAC;IACpC,MAAM,CAAC,uBAAuB,GAAG,SAAS,CAAC;IAC3C,MAAM,CAAC,SAAS,GAAG,wCAAwC,CAAC;IAC5D,MAAM,CAAC,YAAY,GAAG,OAAO,CAAC;IAExC,IAAI,CACF,cAAqC;QAErC,OAAO,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;IACrC,CAAC;IAED,MAAM,CACJ,cAAmC,EACnC,cAA2B;QAE3B,OAAO,IAAI,CAAC,QAAQ,CAClB,cAAc,EACd,cAAc,EACd,IAAI,CAAC,0BAA0B,CAChC,CAAC;IACJ,CAAC;IAED,GAAG,CACD,UAA2B,EAC3B,cAA2B;QAE3B,OAAO,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;IAChD,CAAC;IAED,MAAM,CACJ,UAA2B,EAC3B,cAAmC,EACnC,cAA2B;QAE3B,OAAO,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE,cAAc,EAAE,cAAc,CAAC,CAAC;IACnE,CAAC;IAED,MAAM,CACJ,UAA2B,EAC3B,cAA2B;QAE3B,OAAO,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;IACnD,CAAC;IAED,iBAAiB,CACf,UAA2B,EAC3B,cAA2B;QAE3B,MAAM,MAAM,GAAG;YACb,GAAG,cAAc;YACjB,GAAG,EAAE,EAAE,EAAE,UAAU,EAAE;SACtB,CAAC;QACF,OAAO,IAAI,CAAC,aAAa,CACvB,OAAO,EACP,MAAM,EACN,IAAI,CAAC,cAAc,EACnB,IAAI,CAAC,YAAY,EACjB,IAAI,EACJ,0DAA0D,CAC3D,CAAC;IACJ,CAAC"} \ No newline at end of file +{"version":3,"file":"webhooks.js","sourceRoot":"","sources":["../../src/collections/webhooks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAa/C,MAAM,OAAO,QAAS,SAAQ,cAAc;IAChC,MAAM,CAAC,eAAe,GAAG,UAAU,CAAC;IACpC,MAAM,CAAC,uBAAuB,GAAG,SAAS,CAAC;IAC3C,MAAM,CAAC,SAAS,GAAG,wCAAwC,CAAC;IAC5D,MAAM,CAAC,YAAY,GAAG,OAAO,CAAC;IAExC,IAAI,CACF,cAAqC;QAErC,OAAO,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;IACrC,CAAC;IAED,MAAM,CACJ,cAAmC,EACnC,cAA2B;QAE3B,OAAO,IAAI,CAAC,QAAQ,CAClB,cAAc,EACd,cAAc,EACd,IAAI,CAAC,0BAA0B,CAChC,CAAC;IACJ,CAAC;IAED,GAAG,CACD,UAA2B,EAC3B,cAA2B;QAE3B,OAAO,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;IAChD,CAAC;IAED,MAAM,CACJ,UAA2B,EAC3B,cAAmC,EACnC,cAA2B;QAE3B,OAAO,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE,cAAc,EAAE,cAAc,CAAC,CAAC;IACnE,CAAC;IAED,MAAM,CACJ,UAA2B,EAC3B,cAA2B;QAE3B,OAAO,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;IACnD,CAAC;IAED,iBAAiB,CACf,UAA2B,EAC3B,cAA2B;QAE3B,MAAM,MAAM,GAAG;YACb,GAAG,cAAc;YACjB,GAAG,EAAE,EAAE,EAAE,UAAU,EAAE;SACtB,CAAC;QACF,OAAO,IAAI,CAAC,aAAa,CACvB,OAAO,EACP,MAAM,EACN,IAAI,CAAC,cAAc,EACnB,IAAI,CAAC,YAAY,EACjB,IAAI,EACJ,0DAA0D,CAC3D,CAAC;IACJ,CAAC"} \ No newline at end of file diff --git a/dist/http_client/base.d.ts b/dist/http_client/base.d.ts index 89263b67..ea2297ff 100644 --- a/dist/http_client/base.d.ts +++ b/dist/http_client/base.d.ts @@ -1,4 +1,4 @@ -import { HttpMethod } from "../types/http_method.js"; +import type { HttpMethod } from "../types/http_method.js"; import { Keyable, WritableKeyable } from "../interfaces/keyable.js"; import { ClientData } from "../interfaces/client_data.js"; export declare class ApiRequest { diff --git a/dist/interfaces/index.d.ts b/dist/interfaces/index.d.ts index 22a3b9e3..a4cc4256 100644 --- a/dist/interfaces/index.d.ts +++ b/dist/interfaces/index.d.ts @@ -6,33 +6,16 @@ export { BulkResult } from "./bulk_result.js"; export { ClientData } from "./client_data.js"; export { Comment } from "./comment.js"; export { Contributor } from "./contributor.js"; -export { CreateProjectKeyInput } from "./create_project_key_input.js"; -export { DownloadFileParams } from "./download_file_params.js"; export { File } from "./file.js"; export { Jwt } from "./jwt.js"; -export { GetKeyParams } from "./get_key_params.js"; -export { KeyParamsWithPagination } from "./key_params_with_pagination.js"; export { Key } from "./key.js"; -export { LanguageMapping } from "./language_mapping.js"; export { Language } from "./language.js"; export { Order } from "./order.js"; export { PaginatedResult } from "./paginated_result.js"; -export { PaginationParams } from "./pagination_params.js"; export { PaymentCard } from "./payment_card.js"; -export { ProjectOnly } from "./project_only.js"; export { ProjectSettings } from "./project_settings.js"; export { ProjectStatistics } from "./project_statistics.js"; -export { ProjectWithPagination } from "./project_with_pagination.js"; export { Project } from "./project.js"; -export { OtaSdkToken } from "./ota_sdk_token.js"; -export { OtaApiError } from "./ota_api_error.js"; -export { OtaBundleArchive } from "./ota_bundle_archive.js"; -export { OtaBundle } from "./ota_bundle.js"; -export { OtaFramework } from "./ota_framework.js"; -export { OtaFreezePeriod } from "./ota_freeze_period.js"; -export { OtaStatistics } from "./ota_statistics.js"; -export { OtaTeamProjectFramework } from "./ota_team_project_framework.js"; -export { OtaTeamProject } from "./ota_team_project.js"; export { QueuedProcess } from "./queued_process.js"; export { RefreshTokenResponse } from "./refresh_token_response.js"; export { RequestTokenResponse } from "./request_token_response.js"; @@ -40,14 +23,17 @@ export { Screenshot } from "./screenshot.js"; export { Segment } from "./segment.js"; export { Snapshot } from "./snapshot.js"; export { Task } from "./task.js"; -export { TeamOnly } from "./team_only.js"; export { TeamUserBillingDetails } from "./team_user_billing_details.js"; export { TeamUser } from "./team_user.js"; -export { TeamWithPagination } from "./team_with_pagination.js"; export { Team } from "./team.js"; export { TranslationProvider } from "./translation_provider.js"; export { TranslationStatus } from "./translation_status.js"; export { Translation } from "./translation.js"; -export { UploadFileParams } from "./upload_file_params.js"; export { UserGroup } from "./user_group.js"; export { Webhook } from "./webhook.js"; +export { OtaSdkToken } from "./ota/ota_sdk_token.js"; +export { OtaApiError } from "./ota/ota_api_error.js"; +export { OtaBundleArchive } from "./ota/ota_bundle_archive.js"; +export { OtaBundle } from "./ota/ota_bundle.js"; +export { OtaFreezePeriod } from "./ota/ota_freeze_period.js"; +export { OtaStatistics } from "./ota/ota_statistics.js"; diff --git a/dist/interfaces/ota/ota_api_error.d.ts b/dist/interfaces/ota/ota_api_error.d.ts new file mode 100644 index 00000000..593cecf9 --- /dev/null +++ b/dist/interfaces/ota/ota_api_error.d.ts @@ -0,0 +1,5 @@ +export interface OtaApiError { + statusCode: string; + message: string; + error: string; +} diff --git a/dist/interfaces/ota/ota_api_error.js b/dist/interfaces/ota/ota_api_error.js new file mode 100644 index 00000000..98b4baea --- /dev/null +++ b/dist/interfaces/ota/ota_api_error.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=ota_api_error.js.map \ No newline at end of file diff --git a/dist/interfaces/ota/ota_api_error.js.map b/dist/interfaces/ota/ota_api_error.js.map new file mode 100644 index 00000000..ecc6db48 --- /dev/null +++ b/dist/interfaces/ota/ota_api_error.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ota_api_error.js","sourceRoot":"","sources":["../../../src/interfaces/ota/ota_api_error.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/interfaces/ota/ota_bundle.d.ts b/dist/interfaces/ota/ota_bundle.d.ts new file mode 100644 index 00000000..b7ad545e --- /dev/null +++ b/dist/interfaces/ota/ota_bundle.d.ts @@ -0,0 +1,15 @@ +export interface OtaBundle { + id: number; + projectId: string; + isPrerelease: boolean; + isProduction: boolean; + createdAt: string; + createdBy: string; + framework: string; + description: string; + isFrozen: boolean; + lokaliseId: number; + fileId: string; + fileUrl: string; + modifiedAt: string; +} diff --git a/dist/interfaces/ota/ota_bundle.js b/dist/interfaces/ota/ota_bundle.js new file mode 100644 index 00000000..09d195d5 --- /dev/null +++ b/dist/interfaces/ota/ota_bundle.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=ota_bundle.js.map \ No newline at end of file diff --git a/dist/interfaces/ota/ota_bundle.js.map b/dist/interfaces/ota/ota_bundle.js.map new file mode 100644 index 00000000..506c4bb1 --- /dev/null +++ b/dist/interfaces/ota/ota_bundle.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ota_bundle.js","sourceRoot":"","sources":["../../../src/interfaces/ota/ota_bundle.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/interfaces/ota/ota_bundle_archive.d.ts b/dist/interfaces/ota/ota_bundle_archive.d.ts new file mode 100644 index 00000000..31882008 --- /dev/null +++ b/dist/interfaces/ota/ota_bundle_archive.d.ts @@ -0,0 +1,4 @@ +export interface OtaBundleArchive { + url: string; + version: number; +} diff --git a/dist/interfaces/ota/ota_bundle_archive.js b/dist/interfaces/ota/ota_bundle_archive.js new file mode 100644 index 00000000..0ade54e4 --- /dev/null +++ b/dist/interfaces/ota/ota_bundle_archive.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=ota_bundle_archive.js.map \ No newline at end of file diff --git a/dist/interfaces/ota/ota_bundle_archive.js.map b/dist/interfaces/ota/ota_bundle_archive.js.map new file mode 100644 index 00000000..a2f0387b --- /dev/null +++ b/dist/interfaces/ota/ota_bundle_archive.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ota_bundle_archive.js","sourceRoot":"","sources":["../../../src/interfaces/ota/ota_bundle_archive.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/interfaces/ota/ota_freeze_period.d.ts b/dist/interfaces/ota/ota_freeze_period.d.ts new file mode 100644 index 00000000..08646ab4 --- /dev/null +++ b/dist/interfaces/ota/ota_freeze_period.d.ts @@ -0,0 +1,8 @@ +export interface OtaFreezePeriod { + id: number; + projectId: number; + bundleId: number; + framework: string; + from: string; + to: string; +} diff --git a/dist/interfaces/ota/ota_freeze_period.js b/dist/interfaces/ota/ota_freeze_period.js new file mode 100644 index 00000000..4ebc68b9 --- /dev/null +++ b/dist/interfaces/ota/ota_freeze_period.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=ota_freeze_period.js.map \ No newline at end of file diff --git a/dist/interfaces/ota/ota_freeze_period.js.map b/dist/interfaces/ota/ota_freeze_period.js.map new file mode 100644 index 00000000..be0d6cad --- /dev/null +++ b/dist/interfaces/ota/ota_freeze_period.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ota_freeze_period.js","sourceRoot":"","sources":["../../../src/interfaces/ota/ota_freeze_period.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/interfaces/ota/ota_sdk_token.d.ts b/dist/interfaces/ota/ota_sdk_token.d.ts new file mode 100644 index 00000000..8f1d21dc --- /dev/null +++ b/dist/interfaces/ota/ota_sdk_token.d.ts @@ -0,0 +1,7 @@ +export interface OtaSdkToken { + id: number; + token: string; + projectId: number; + lokaliseId: number; + createdAt: string; +} diff --git a/dist/interfaces/ota/ota_sdk_token.js b/dist/interfaces/ota/ota_sdk_token.js new file mode 100644 index 00000000..a567a56c --- /dev/null +++ b/dist/interfaces/ota/ota_sdk_token.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=ota_sdk_token.js.map \ No newline at end of file diff --git a/dist/interfaces/ota/ota_sdk_token.js.map b/dist/interfaces/ota/ota_sdk_token.js.map new file mode 100644 index 00000000..d9aac7bf --- /dev/null +++ b/dist/interfaces/ota/ota_sdk_token.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ota_sdk_token.js","sourceRoot":"","sources":["../../../src/interfaces/ota/ota_sdk_token.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/interfaces/ota/ota_statistics.d.ts b/dist/interfaces/ota/ota_statistics.d.ts new file mode 100644 index 00000000..8de5c4e2 --- /dev/null +++ b/dist/interfaces/ota/ota_statistics.d.ts @@ -0,0 +1,25 @@ +export interface OtaStatistics { + lokaliseProjectId: string; + from: string; + to: string; + sdk: string; + daily: Array<{ + date: string; + downloads: number; + trafficMb: number; + trafficBytes: string; + framework: string; + }>; + monthly: Array<{ + date: string; + downloads: number; + trafficMb: number; + trafficBytes: string; + framework: string; + }>; + totals: { + downloads: number; + trafficMb: number; + trafficBytes: string; + }; +} diff --git a/dist/interfaces/ota/ota_statistics.js b/dist/interfaces/ota/ota_statistics.js new file mode 100644 index 00000000..3b433789 --- /dev/null +++ b/dist/interfaces/ota/ota_statistics.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=ota_statistics.js.map \ No newline at end of file diff --git a/dist/interfaces/ota/ota_statistics.js.map b/dist/interfaces/ota/ota_statistics.js.map new file mode 100644 index 00000000..46942d4a --- /dev/null +++ b/dist/interfaces/ota/ota_statistics.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ota_statistics.js","sourceRoot":"","sources":["../../../src/interfaces/ota/ota_statistics.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/main.d.ts b/dist/main.d.ts index 3b093259..744618bf 100644 --- a/dist/main.d.ts +++ b/dist/main.d.ts @@ -5,4 +5,4 @@ import { LokaliseOtaBundles } from "./lokalise/lokalise_ota_bundles.js"; import { LokaliseAuth } from "./oauth2/lokalise_auth.js"; export { LokaliseApi, LokaliseAuth, LokaliseApiOAuth, LokaliseApiOta, LokaliseOtaBundles, }; export * from "./interfaces/index.js"; -export * from "./types/index.js"; +export type * from "./types/index.js"; diff --git a/dist/main.js b/dist/main.js index 12506560..223d294c 100644 --- a/dist/main.js +++ b/dist/main.js @@ -5,5 +5,4 @@ import { LokaliseOtaBundles } from "./lokalise/lokalise_ota_bundles.js"; import { LokaliseAuth } from "./oauth2/lokalise_auth.js"; export { LokaliseApi, LokaliseAuth, LokaliseApiOAuth, LokaliseApiOta, LokaliseOtaBundles, }; export * from "./interfaces/index.js"; -export * from "./types/index.js"; //# sourceMappingURL=main.js.map \ No newline at end of file diff --git a/dist/main.js.map b/dist/main.js.map index 0aacd5c9..e1e54c35 100644 --- a/dist/main.js.map +++ b/dist/main.js.map @@ -1 +1 @@ -{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AACxE,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EACL,WAAW,EACX,YAAY,EACZ,gBAAgB,EAChB,cAAc,EACd,kBAAkB,GACnB,CAAC;AACF,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC"} \ No newline at end of file +{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AACxE,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EACL,WAAW,EACX,YAAY,EACZ,gBAAgB,EAChB,cAAc,EACd,kBAAkB,GACnB,CAAC;AACF,cAAc,uBAAuB,CAAC"} \ No newline at end of file diff --git a/dist/models/ota/ota_api_error.d.ts b/dist/models/ota/ota_api_error.d.ts new file mode 100644 index 00000000..2312e049 --- /dev/null +++ b/dist/models/ota/ota_api_error.d.ts @@ -0,0 +1,7 @@ +import { OtaApiError as OtaApiErrorInterface } from "../../interfaces/ota/ota_api_error.js"; +import { BaseModel } from "../base_model.js"; +export declare class OtaApiError extends BaseModel implements OtaApiErrorInterface { + statusCode: string; + message: string; + error: string; +} diff --git a/dist/models/ota/ota_api_error.js b/dist/models/ota/ota_api_error.js new file mode 100644 index 00000000..8a39e31f --- /dev/null +++ b/dist/models/ota/ota_api_error.js @@ -0,0 +1,4 @@ +import { BaseModel } from "../base_model.js"; +export class OtaApiError extends BaseModel { +} +//# sourceMappingURL=ota_api_error.js.map \ No newline at end of file diff --git a/dist/models/ota/ota_api_error.js.map b/dist/models/ota/ota_api_error.js.map new file mode 100644 index 00000000..fcd4b345 --- /dev/null +++ b/dist/models/ota/ota_api_error.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ota_api_error.js","sourceRoot":"","sources":["../../../src/models/ota/ota_api_error.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,MAAM,OAAO,WAAY,SAAQ,SAAS;CAIzC"} \ No newline at end of file diff --git a/dist/models/ota/ota_bundle.d.ts b/dist/models/ota/ota_bundle.d.ts new file mode 100644 index 00000000..45981ce6 --- /dev/null +++ b/dist/models/ota/ota_bundle.d.ts @@ -0,0 +1,17 @@ +import { OtaBundle as OtaBundleInterface } from "../../interfaces/ota/ota_bundle.js"; +import { BaseModel } from "./../base_model.js"; +export declare class OtaBundle extends BaseModel implements OtaBundleInterface { + id: number; + projectId: string; + isPrerelease: boolean; + isProduction: boolean; + createdAt: string; + createdBy: string; + framework: string; + description: string; + isFrozen: boolean; + lokaliseId: number; + fileId: string; + fileUrl: string; + modifiedAt: string; +} diff --git a/dist/models/ota/ota_bundle.js b/dist/models/ota/ota_bundle.js new file mode 100644 index 00000000..d2840a73 --- /dev/null +++ b/dist/models/ota/ota_bundle.js @@ -0,0 +1,4 @@ +import { BaseModel } from "./../base_model.js"; +export class OtaBundle extends BaseModel { +} +//# sourceMappingURL=ota_bundle.js.map \ No newline at end of file diff --git a/dist/models/ota/ota_bundle.js.map b/dist/models/ota/ota_bundle.js.map new file mode 100644 index 00000000..1c2f57a9 --- /dev/null +++ b/dist/models/ota/ota_bundle.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ota_bundle.js","sourceRoot":"","sources":["../../../src/models/ota/ota_bundle.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,MAAM,OAAO,SAAU,SAAQ,SAAS;CAcvC"} \ No newline at end of file diff --git a/dist/models/ota/ota_bundle_archive.d.ts b/dist/models/ota/ota_bundle_archive.d.ts new file mode 100644 index 00000000..9e992a2d --- /dev/null +++ b/dist/models/ota/ota_bundle_archive.d.ts @@ -0,0 +1,6 @@ +import { OtaBundleArchive as OtaBundleArchiveInterface } from "../../interfaces/ota/ota_bundle_archive.js"; +import { BaseModel } from "./../base_model.js"; +export declare class OtaBundleArchive extends BaseModel implements OtaBundleArchiveInterface { + url: string; + version: number; +} diff --git a/dist/models/ota/ota_bundle_archive.js b/dist/models/ota/ota_bundle_archive.js new file mode 100644 index 00000000..016f52b7 --- /dev/null +++ b/dist/models/ota/ota_bundle_archive.js @@ -0,0 +1,4 @@ +import { BaseModel } from "./../base_model.js"; +export class OtaBundleArchive extends BaseModel { +} +//# sourceMappingURL=ota_bundle_archive.js.map \ No newline at end of file diff --git a/dist/models/ota/ota_bundle_archive.js.map b/dist/models/ota/ota_bundle_archive.js.map new file mode 100644 index 00000000..70389c4c --- /dev/null +++ b/dist/models/ota/ota_bundle_archive.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ota_bundle_archive.js","sourceRoot":"","sources":["../../../src/models/ota/ota_bundle_archive.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,MAAM,OAAO,gBACX,SAAQ,SAAS;CAKlB"} \ No newline at end of file diff --git a/dist/models/ota/ota_freeze_period.d.ts b/dist/models/ota/ota_freeze_period.d.ts new file mode 100644 index 00000000..1bca9c84 --- /dev/null +++ b/dist/models/ota/ota_freeze_period.d.ts @@ -0,0 +1,10 @@ +import { OtaFreezePeriod as OtaFreezePeriodInterface } from "../../interfaces/ota/ota_freeze_period.js"; +import { BaseModel } from "./../base_model.js"; +export declare class OtaFreezePeriod extends BaseModel implements OtaFreezePeriodInterface { + id: number; + projectId: number; + bundleId: number; + framework: string; + from: string; + to: string; +} diff --git a/dist/models/ota/ota_freeze_period.js b/dist/models/ota/ota_freeze_period.js new file mode 100644 index 00000000..d3ddccbf --- /dev/null +++ b/dist/models/ota/ota_freeze_period.js @@ -0,0 +1,4 @@ +import { BaseModel } from "./../base_model.js"; +export class OtaFreezePeriod extends BaseModel { +} +//# sourceMappingURL=ota_freeze_period.js.map \ No newline at end of file diff --git a/dist/models/ota/ota_freeze_period.js.map b/dist/models/ota/ota_freeze_period.js.map new file mode 100644 index 00000000..b7379bee --- /dev/null +++ b/dist/models/ota/ota_freeze_period.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ota_freeze_period.js","sourceRoot":"","sources":["../../../src/models/ota/ota_freeze_period.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,MAAM,OAAO,eACX,SAAQ,SAAS;CASlB"} \ No newline at end of file diff --git a/dist/models/ota/ota_sdk_token.d.ts b/dist/models/ota/ota_sdk_token.d.ts new file mode 100644 index 00000000..3404043c --- /dev/null +++ b/dist/models/ota/ota_sdk_token.d.ts @@ -0,0 +1,9 @@ +import { BaseModel } from "./../base_model.js"; +import { OtaSdkToken as OtaSdkTokenInterface } from "../../interfaces/ota/ota_sdk_token.js"; +export declare class OtaSdkToken extends BaseModel implements OtaSdkTokenInterface { + id: number; + token: string; + projectId: number; + lokaliseId: number; + createdAt: string; +} diff --git a/dist/models/ota/ota_sdk_token.js b/dist/models/ota/ota_sdk_token.js new file mode 100644 index 00000000..177b497d --- /dev/null +++ b/dist/models/ota/ota_sdk_token.js @@ -0,0 +1,4 @@ +import { BaseModel } from "./../base_model.js"; +export class OtaSdkToken extends BaseModel { +} +//# sourceMappingURL=ota_sdk_token.js.map \ No newline at end of file diff --git a/dist/models/ota/ota_sdk_token.js.map b/dist/models/ota/ota_sdk_token.js.map new file mode 100644 index 00000000..cac87cd8 --- /dev/null +++ b/dist/models/ota/ota_sdk_token.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ota_sdk_token.js","sourceRoot":"","sources":["../../../src/models/ota/ota_sdk_token.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAG/C,MAAM,OAAO,WAAY,SAAQ,SAAS;CAMzC"} \ No newline at end of file diff --git a/dist/models/ota/ota_statistics.d.ts b/dist/models/ota/ota_statistics.d.ts new file mode 100644 index 00000000..f9cd90f7 --- /dev/null +++ b/dist/models/ota/ota_statistics.d.ts @@ -0,0 +1,27 @@ +import { OtaStatistics as OtaStatisticsInterface } from "../../interfaces/ota/ota_statistics.js"; +import { BaseModel } from "./../base_model.js"; +export declare class OtaStatistics extends BaseModel implements OtaStatisticsInterface { + lokaliseProjectId: string; + from: string; + to: string; + sdk: string; + daily: Array<{ + date: string; + downloads: number; + trafficMb: number; + trafficBytes: string; + framework: string; + }>; + monthly: Array<{ + date: string; + downloads: number; + trafficMb: number; + trafficBytes: string; + framework: string; + }>; + totals: { + downloads: number; + trafficMb: number; + trafficBytes: string; + }; +} diff --git a/dist/models/ota/ota_statistics.js b/dist/models/ota/ota_statistics.js new file mode 100644 index 00000000..3330a7cb --- /dev/null +++ b/dist/models/ota/ota_statistics.js @@ -0,0 +1,4 @@ +import { BaseModel } from "./../base_model.js"; +export class OtaStatistics extends BaseModel { +} +//# sourceMappingURL=ota_statistics.js.map \ No newline at end of file diff --git a/dist/models/ota/ota_statistics.js.map b/dist/models/ota/ota_statistics.js.map new file mode 100644 index 00000000..82347e85 --- /dev/null +++ b/dist/models/ota/ota_statistics.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ota_statistics.js","sourceRoot":"","sources":["../../../src/models/ota/ota_statistics.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,MAAM,OAAO,aAAc,SAAQ,SAAS;CAwB3C"} \ No newline at end of file diff --git a/dist/oauth2/auth_request.d.ts b/dist/oauth2/auth_request.d.ts index 64f5442f..6b564d52 100644 --- a/dist/oauth2/auth_request.d.ts +++ b/dist/oauth2/auth_request.d.ts @@ -1,5 +1,5 @@ -import { HttpMethod } from "../types/http_method.js"; import { AuthData as AuthDataInterface } from "../interfaces/auth_data.js"; +import type { HttpMethod } from "../types/http_method.js"; export declare class AuthRequest { static createPromise(uri: string, method: HttpMethod, body: object | object[] | null, clientData: AuthDataInterface): Promise; } diff --git a/dist/ota_collections/ota_bundle_management.d.ts b/dist/ota_collections/ota_bundle_management.d.ts index f4cb017b..6b0e9173 100644 --- a/dist/ota_collections/ota_bundle_management.d.ts +++ b/dist/ota_collections/ota_bundle_management.d.ts @@ -1,10 +1,6 @@ import { OtaCollection } from "./ota_collection.js"; -import { OtaBundle } from "../models/ota_bundle.js"; -import { OtaTeamProject } from "../interfaces/ota_team_project.js"; -import { OtaResourceDeleted } from "../types/ota_resource_deleted.js"; -type BundleUpdateData = { - description: string; -}; +import { OtaBundle } from "../models/ota/ota_bundle.js"; +import type { OtaResourceDeleted, OtaTeamProject, OtaBundleUpdateData } from "../types/ota.js"; export declare class OtaBundleManagement extends OtaCollection { protected static rootElementName: string; protected static rootElementNameSingular: string; @@ -12,7 +8,6 @@ export declare class OtaBundleManagement extends OtaCollection { protected static elementClass: typeof OtaBundle; list(request_params: OtaTeamProject): Promise; get(bundleId: string | number, requestParams: OtaTeamProject): Promise; - update(bundleId: string | number, bundleParams: BundleUpdateData, requestParams: OtaTeamProject): Promise; + update(bundleId: string | number, bundleParams: OtaBundleUpdateData, requestParams: OtaTeamProject): Promise; delete(bundleId: string | number, requestParams: OtaTeamProject): Promise; } -export {}; diff --git a/dist/ota_collections/ota_bundle_management.js b/dist/ota_collections/ota_bundle_management.js index 56446103..7e7ad605 100644 --- a/dist/ota_collections/ota_bundle_management.js +++ b/dist/ota_collections/ota_bundle_management.js @@ -1,5 +1,5 @@ import { OtaCollection } from "./ota_collection.js"; -import { OtaBundle } from "../models/ota_bundle.js"; +import { OtaBundle } from "../models/ota/ota_bundle.js"; export class OtaBundleManagement extends OtaCollection { static rootElementName = "data"; static rootElementNameSingular = "data"; diff --git a/dist/ota_collections/ota_bundle_management.js.map b/dist/ota_collections/ota_bundle_management.js.map index bfefbc7a..1675f632 100644 --- a/dist/ota_collections/ota_bundle_management.js.map +++ b/dist/ota_collections/ota_bundle_management.js.map @@ -1 +1 @@ -{"version":3,"file":"ota_bundle_management.js","sourceRoot":"","sources":["../../src/ota_collections/ota_bundle_management.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAQpD,MAAM,OAAO,mBAAoB,SAAQ,aAAa;IAC1C,MAAM,CAAC,eAAe,GAAG,MAAM,CAAC;IAChC,MAAM,CAAC,uBAAuB,GAAG,MAAM,CAAC;IACxC,MAAM,CAAC,SAAS,GACxB,+DAA+D,CAAC;IACxD,MAAM,CAAC,YAAY,GAAG,SAAS,CAAC;IAE1C,IAAI,CAAC,cAA8B;QACjC,OAAO,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;IACrC,CAAC;IAED,GAAG,CACD,QAAyB,EACzB,aAA6B;QAE7B,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC;IAC7C,CAAC;IAED,MAAM,CACJ,QAAyB,EACzB,YAA8B,EAC9B,aAA6B;QAE7B,OAAO,IAAI,CAAC,QAAQ,CAClB,QAAQ,EACR,YAAY,EACZ,aAAa,EACb,IAAI,CAAC,0BAA0B,EAC/B,OAAO,CACR,CAAC;IACJ,CAAC;IAED,MAAM,CACJ,QAAyB,EACzB,aAA6B;QAE7B,OAAO,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC;IAChD,CAAC"} \ No newline at end of file +{"version":3,"file":"ota_bundle_management.js","sourceRoot":"","sources":["../../src/ota_collections/ota_bundle_management.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAOxD,MAAM,OAAO,mBAAoB,SAAQ,aAAa;IAC1C,MAAM,CAAC,eAAe,GAAG,MAAM,CAAC;IAChC,MAAM,CAAC,uBAAuB,GAAG,MAAM,CAAC;IACxC,MAAM,CAAC,SAAS,GACxB,+DAA+D,CAAC;IACxD,MAAM,CAAC,YAAY,GAAG,SAAS,CAAC;IAE1C,IAAI,CAAC,cAA8B;QACjC,OAAO,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;IACrC,CAAC;IAED,GAAG,CACD,QAAyB,EACzB,aAA6B;QAE7B,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC;IAC7C,CAAC;IAED,MAAM,CACJ,QAAyB,EACzB,YAAiC,EACjC,aAA6B;QAE7B,OAAO,IAAI,CAAC,QAAQ,CAClB,QAAQ,EACR,YAAY,EACZ,aAAa,EACb,IAAI,CAAC,0BAA0B,EAC/B,OAAO,CACR,CAAC;IACJ,CAAC;IAED,MAAM,CACJ,QAAyB,EACzB,aAA6B;QAE7B,OAAO,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC;IAChD,CAAC"} \ No newline at end of file diff --git a/dist/ota_collections/ota_bundle_publishing.d.ts b/dist/ota_collections/ota_bundle_publishing.d.ts index 803993e0..bb6703e5 100644 --- a/dist/ota_collections/ota_bundle_publishing.d.ts +++ b/dist/ota_collections/ota_bundle_publishing.d.ts @@ -1,5 +1,5 @@ import { OtaCollection } from "./ota_collection.js"; -import { OtaTeamProjectFramework } from "../interfaces/ota_team_project_framework.js"; +import type { OtaTeamProjectFramework } from "../types/ota.js"; export declare class OtaBundlePublishing extends OtaCollection { protected static prefixURI: string; publish(bundleId: number | string, request_params: OtaTeamProjectFramework): Promise; diff --git a/dist/ota_collections/ota_bundles.d.ts b/dist/ota_collections/ota_bundles.d.ts index 2ec7ca73..dc8083c2 100644 --- a/dist/ota_collections/ota_bundles.d.ts +++ b/dist/ota_collections/ota_bundles.d.ts @@ -1,18 +1,9 @@ import { OtaCollection } from "./ota_collection.js"; -import { OtaBundleArchive } from "../models/ota_bundle_archive.js"; -import { OtaFramework } from "../interfaces/ota_framework.js"; -type RequestBundleParams = { - appVersion: string; - transVersion: number; - prerelease?: boolean; -}; -interface OtaProjectFramework extends OtaFramework { - lokaliseProjectId: string; -} +import { OtaBundleArchive } from "../models/ota/ota_bundle_archive.js"; +import type { OtaRequestBundleParams, OtaProjectFramework } from "../types/ota.js"; export declare class OtaBundles extends OtaCollection { protected static rootElementNameSingular: string; protected static prefixURI: string; protected static elementClass: typeof OtaBundleArchive; - get(bundle_params: RequestBundleParams, request_params: OtaProjectFramework): Promise; + get(bundle_params: OtaRequestBundleParams, request_params: OtaProjectFramework): Promise; } -export {}; diff --git a/dist/ota_collections/ota_bundles.js b/dist/ota_collections/ota_bundles.js index f09e80c9..f4c867fa 100644 --- a/dist/ota_collections/ota_bundles.js +++ b/dist/ota_collections/ota_bundles.js @@ -1,5 +1,5 @@ import { OtaCollection } from "./ota_collection.js"; -import { OtaBundleArchive } from "../models/ota_bundle_archive.js"; +import { OtaBundleArchive } from "../models/ota/ota_bundle_archive.js"; export class OtaBundles extends OtaCollection { static rootElementNameSingular = "data"; static prefixURI = "lokalise/projects/{!:lokaliseProjectId}/frameworks/{!:framework}"; diff --git a/dist/ota_collections/ota_bundles.js.map b/dist/ota_collections/ota_bundles.js.map index 4c3e651e..dfd06045 100644 --- a/dist/ota_collections/ota_bundles.js.map +++ b/dist/ota_collections/ota_bundles.js.map @@ -1 +1 @@ -{"version":3,"file":"ota_bundles.js","sourceRoot":"","sources":["../../src/ota_collections/ota_bundles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAanE,MAAM,OAAO,UAAW,SAAQ,aAAa;IACjC,MAAM,CAAC,uBAAuB,GAAG,MAAM,CAAC;IACxC,MAAM,CAAC,SAAS,GACxB,kEAAkE,CAAC;IAC3D,MAAM,CAAC,YAAY,GAAG,gBAAgB,CAAC;IAEjD,GAAG,CACD,aAAkC,EAClC,cAAmC;QAEnC,MAAM,MAAM,GAAG;YACb,GAAG,cAAc;YACjB,GAAG,aAAa;SACjB,CAAC;QAEF,OAAO,IAAI,CAAC,aAAa,CACvB,KAAK,EACL,MAAM,EACN,IAAI,CAAC,0BAA0B,EAC/B,IAAI,CAAC,YAAY,EACjB,IAAI,CACL,CAAC;IACJ,CAAC"} \ No newline at end of file +{"version":3,"file":"ota_bundles.js","sourceRoot":"","sources":["../../src/ota_collections/ota_bundles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AAMvE,MAAM,OAAO,UAAW,SAAQ,aAAa;IACjC,MAAM,CAAC,uBAAuB,GAAG,MAAM,CAAC;IACxC,MAAM,CAAC,SAAS,GACxB,kEAAkE,CAAC;IAC3D,MAAM,CAAC,YAAY,GAAG,gBAAgB,CAAC;IAEjD,GAAG,CACD,aAAqC,EACrC,cAAmC;QAEnC,MAAM,MAAM,GAAG;YACb,GAAG,cAAc;YACjB,GAAG,aAAa;SACjB,CAAC;QAEF,OAAO,IAAI,CAAC,aAAa,CACvB,KAAK,EACL,MAAM,EACN,IAAI,CAAC,0BAA0B,EAC/B,IAAI,CAAC,YAAY,EACjB,IAAI,CACL,CAAC;IACJ,CAAC"} \ No newline at end of file diff --git a/dist/ota_collections/ota_freeze_periods.d.ts b/dist/ota_collections/ota_freeze_periods.d.ts index f90726d8..a7f9dba0 100644 --- a/dist/ota_collections/ota_freeze_periods.d.ts +++ b/dist/ota_collections/ota_freeze_periods.d.ts @@ -1,21 +1,13 @@ import { OtaCollection } from "./ota_collection.js"; -import { OtaFreezePeriod } from "../models/ota_freeze_period.js"; -import { OtaTeamProject } from "../interfaces/ota_team_project.js"; -import { OtaTeamProjectFramework } from "../interfaces/ota_team_project_framework.js"; -import { OtaResourceDeleted } from "../types/ota_resource_deleted.js"; -type FreezePeriodParams = { - from: string; - to: string; - bundleId: number | string; -}; +import { OtaFreezePeriod } from "../models/ota/ota_freeze_period.js"; +import type { OtaTeamProject, OtaTeamProjectFramework, OtaResourceDeleted, OtaFreezePeriodParams } from "../types/ota.js"; export declare class OtaFreezePeriods extends OtaCollection { protected static rootElementName: string; protected static rootElementNameSingular: string; protected static prefixURI: string; protected static elementClass: typeof OtaFreezePeriod; list(requestParams: OtaTeamProjectFramework): Promise; - create(freezeParams: FreezePeriodParams, requestParams: OtaTeamProject): Promise; - update(freezeId: string | number, freezeParams: FreezePeriodParams, requestParams: OtaTeamProject): Promise; + create(freezeParams: OtaFreezePeriodParams, requestParams: OtaTeamProject): Promise; + update(freezeId: string | number, freezeParams: OtaFreezePeriodParams, requestParams: OtaTeamProject): Promise; delete(freezeId: string | number, requestParams: OtaTeamProject): Promise; } -export {}; diff --git a/dist/ota_collections/ota_freeze_periods.js b/dist/ota_collections/ota_freeze_periods.js index 76491f62..3a3e8947 100644 --- a/dist/ota_collections/ota_freeze_periods.js +++ b/dist/ota_collections/ota_freeze_periods.js @@ -1,5 +1,5 @@ import { OtaCollection } from "./ota_collection.js"; -import { OtaFreezePeriod } from "../models/ota_freeze_period.js"; +import { OtaFreezePeriod } from "../models/ota/ota_freeze_period.js"; export class OtaFreezePeriods extends OtaCollection { static rootElementName = "data"; static rootElementNameSingular = "data"; diff --git a/dist/ota_collections/ota_freeze_periods.js.map b/dist/ota_collections/ota_freeze_periods.js.map index 903591bf..a6620102 100644 --- a/dist/ota_collections/ota_freeze_periods.js.map +++ b/dist/ota_collections/ota_freeze_periods.js.map @@ -1 +1 @@ -{"version":3,"file":"ota_freeze_periods.js","sourceRoot":"","sources":["../../src/ota_collections/ota_freeze_periods.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAWjE,MAAM,OAAO,gBAAiB,SAAQ,aAAa;IACvC,MAAM,CAAC,eAAe,GAAG,MAAM,CAAC;IAChC,MAAM,CAAC,uBAAuB,GAAG,MAAM,CAAC;IACxC,MAAM,CAAC,SAAS,GACxB,sEAAsE,CAAC;IAC/D,MAAM,CAAC,YAAY,GAAG,eAAe,CAAC;IAEhD,IAAI,CAAC,aAAsC;QACzC,OAAO,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;IACpC,CAAC;IAED,MAAM,CACJ,YAAgC,EAChC,aAA6B;QAE7B,OAAO,IAAI,CAAC,QAAQ,CAClB,YAAY,EACZ,aAAa,EACb,IAAI,CAAC,0BAA0B,CAChC,CAAC;IACJ,CAAC;IAED,MAAM,CACJ,QAAyB,EACzB,YAAgC,EAChC,aAA6B;QAE7B,OAAO,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,YAAY,EAAE,aAAa,CAAC,CAAC;IAC9D,CAAC;IAED,MAAM,CACJ,QAAyB,EACzB,aAA6B;QAE7B,OAAO,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC;IAChD,CAAC"} \ No newline at end of file +{"version":3,"file":"ota_freeze_periods.js","sourceRoot":"","sources":["../../src/ota_collections/ota_freeze_periods.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAQrE,MAAM,OAAO,gBAAiB,SAAQ,aAAa;IACvC,MAAM,CAAC,eAAe,GAAG,MAAM,CAAC;IAChC,MAAM,CAAC,uBAAuB,GAAG,MAAM,CAAC;IACxC,MAAM,CAAC,SAAS,GACxB,sEAAsE,CAAC;IAC/D,MAAM,CAAC,YAAY,GAAG,eAAe,CAAC;IAEhD,IAAI,CAAC,aAAsC;QACzC,OAAO,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;IACpC,CAAC;IAED,MAAM,CACJ,YAAmC,EACnC,aAA6B;QAE7B,OAAO,IAAI,CAAC,QAAQ,CAClB,YAAY,EACZ,aAAa,EACb,IAAI,CAAC,0BAA0B,CAChC,CAAC;IACJ,CAAC;IAED,MAAM,CACJ,QAAyB,EACzB,YAAmC,EACnC,aAA6B;QAE7B,OAAO,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,YAAY,EAAE,aAAa,CAAC,CAAC;IAC9D,CAAC;IAED,MAAM,CACJ,QAAyB,EACzB,aAA6B;QAE7B,OAAO,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC;IAChD,CAAC"} \ No newline at end of file diff --git a/dist/ota_collections/ota_sdk_tokens.d.ts b/dist/ota_collections/ota_sdk_tokens.d.ts index 8b55b508..48f972ed 100644 --- a/dist/ota_collections/ota_sdk_tokens.d.ts +++ b/dist/ota_collections/ota_sdk_tokens.d.ts @@ -1,7 +1,6 @@ import { OtaCollection } from "./ota_collection.js"; -import { OtaSdkToken } from "../models/ota_sdk_token.js"; -import { OtaTeamProject } from "../interfaces/ota_team_project.js"; -import { OtaResourceDeleted } from "../types/ota_resource_deleted.js"; +import { OtaSdkToken } from "../models/ota/ota_sdk_token.js"; +import type { OtaTeamProject, OtaResourceDeleted } from "../types/ota.js"; export declare class OtaSdkTokens extends OtaCollection { protected static rootElementName: string; protected static rootElementNameSingular: string; diff --git a/dist/ota_collections/ota_sdk_tokens.js b/dist/ota_collections/ota_sdk_tokens.js index 76fe6795..5017d754 100644 --- a/dist/ota_collections/ota_sdk_tokens.js +++ b/dist/ota_collections/ota_sdk_tokens.js @@ -1,5 +1,5 @@ import { OtaCollection } from "./ota_collection.js"; -import { OtaSdkToken } from "../models/ota_sdk_token.js"; +import { OtaSdkToken } from "../models/ota/ota_sdk_token.js"; export class OtaSdkTokens extends OtaCollection { static rootElementName = "data"; static rootElementNameSingular = "data"; diff --git a/dist/ota_collections/ota_sdk_tokens.js.map b/dist/ota_collections/ota_sdk_tokens.js.map index e1243abf..16f0e8b0 100644 --- a/dist/ota_collections/ota_sdk_tokens.js.map +++ b/dist/ota_collections/ota_sdk_tokens.js.map @@ -1 +1 @@ -{"version":3,"file":"ota_sdk_tokens.js","sourceRoot":"","sources":["../../src/ota_collections/ota_sdk_tokens.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAIzD,MAAM,OAAO,YAAa,SAAQ,aAAa;IACnC,MAAM,CAAC,eAAe,GAAG,MAAM,CAAC;IAChC,MAAM,CAAC,uBAAuB,GAAG,MAAM,CAAC;IACxC,MAAM,CAAC,SAAS,GACxB,8DAA8D,CAAC;IACvD,MAAM,CAAC,YAAY,GAAG,WAAW,CAAC;IAE5C,IAAI,CAAC,cAA8B;QACjC,OAAO,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;IACrC,CAAC;IAED,MAAM,CAAC,cAA8B;QACnC,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,0BAA0B,CAAC,CAAC;IAC9E,CAAC;IAED,MAAM,CACJ,OAAwB,EACxB,cAA8B;QAE9B,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;IAChD,CAAC"} \ No newline at end of file +{"version":3,"file":"ota_sdk_tokens.js","sourceRoot":"","sources":["../../src/ota_collections/ota_sdk_tokens.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAG7D,MAAM,OAAO,YAAa,SAAQ,aAAa;IACnC,MAAM,CAAC,eAAe,GAAG,MAAM,CAAC;IAChC,MAAM,CAAC,uBAAuB,GAAG,MAAM,CAAC;IACxC,MAAM,CAAC,SAAS,GACxB,8DAA8D,CAAC;IACvD,MAAM,CAAC,YAAY,GAAG,WAAW,CAAC;IAE5C,IAAI,CAAC,cAA8B;QACjC,OAAO,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;IACrC,CAAC;IAED,MAAM,CAAC,cAA8B;QACnC,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,0BAA0B,CAAC,CAAC;IAC9E,CAAC;IAED,MAAM,CACJ,OAAwB,EACxB,cAA8B;QAE9B,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;IAChD,CAAC"} \ No newline at end of file diff --git a/dist/ota_collections/ota_usage_statistics.d.ts b/dist/ota_collections/ota_usage_statistics.d.ts index 85283d44..91a7a0c5 100644 --- a/dist/ota_collections/ota_usage_statistics.d.ts +++ b/dist/ota_collections/ota_usage_statistics.d.ts @@ -1,14 +1,8 @@ import { OtaCollection } from "./ota_collection.js"; -import { OtaStatistics } from "../models/ota_statistics.js"; -import { OtaTeamProject } from "../interfaces/ota_team_project.js"; -type OtaUsageParams = { - dateFrom: string; - dateTo: string; - framework?: string; -}; +import { OtaStatistics } from "../models/ota/ota_statistics.js"; +import type { OtaTeamProject, OtaUsageParams } from "../types/ota.js"; export declare class OtaUsageStatistics extends OtaCollection { protected static prefixURI: string; protected static elementClass: typeof OtaStatistics; get(bundle_params: OtaUsageParams, request_params: OtaTeamProject): Promise; } -export {}; diff --git a/dist/ota_collections/ota_usage_statistics.js b/dist/ota_collections/ota_usage_statistics.js index f32d74e6..e82cc1a5 100644 --- a/dist/ota_collections/ota_usage_statistics.js +++ b/dist/ota_collections/ota_usage_statistics.js @@ -1,5 +1,5 @@ import { OtaCollection } from "./ota_collection.js"; -import { OtaStatistics } from "../models/ota_statistics.js"; +import { OtaStatistics } from "../models/ota/ota_statistics.js"; export class OtaUsageStatistics extends OtaCollection { static prefixURI = "teams/{!:teamId}/projects/{!:lokaliseProjectId}/stats"; static elementClass = OtaStatistics; diff --git a/dist/ota_collections/ota_usage_statistics.js.map b/dist/ota_collections/ota_usage_statistics.js.map index ab2d3dfc..891eebbe 100644 --- a/dist/ota_collections/ota_usage_statistics.js.map +++ b/dist/ota_collections/ota_usage_statistics.js.map @@ -1 +1 @@ -{"version":3,"file":"ota_usage_statistics.js","sourceRoot":"","sources":["../../src/ota_collections/ota_usage_statistics.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAS5D,MAAM,OAAO,kBAAmB,SAAQ,aAAa;IACzC,MAAM,CAAC,SAAS,GACxB,uDAAuD,CAAC;IAChD,MAAM,CAAC,YAAY,GAAG,aAAa,CAAC;IAE9C,GAAG,CACD,aAA6B,EAC7B,cAA8B;QAE9B,MAAM,MAAM,GAAG;YACb,GAAG,cAAc;YACjB,GAAG,aAAa;SACjB,CAAC;QAEF,OAAO,IAAI,CAAC,aAAa,CACvB,KAAK,EACL,MAAM,EACN,IAAI,CAAC,sBAAsB,EAC3B,IAAI,CAAC,YAAY,EACjB,IAAI,CACL,CAAC;IACJ,CAAC"} \ No newline at end of file +{"version":3,"file":"ota_usage_statistics.js","sourceRoot":"","sources":["../../src/ota_collections/ota_usage_statistics.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAGhE,MAAM,OAAO,kBAAmB,SAAQ,aAAa;IACzC,MAAM,CAAC,SAAS,GACxB,uDAAuD,CAAC;IAChD,MAAM,CAAC,YAAY,GAAG,aAAa,CAAC;IAE9C,GAAG,CACD,aAA6B,EAC7B,cAA8B;QAE9B,MAAM,MAAM,GAAG;YACb,GAAG,cAAc;YACjB,GAAG,aAAa;SACjB,CAAC;QAEF,OAAO,IAAI,CAAC,aAAa,CACvB,KAAK,EACL,MAAM,EACN,IAAI,CAAC,sBAAsB,EAC3B,IAAI,CAAC,YAAY,EACjB,IAAI,CACL,CAAC;IACJ,CAAC"} \ No newline at end of file diff --git a/dist/types/billing_details.d.ts b/dist/types/billing_details.d.ts new file mode 100644 index 00000000..8646eacd --- /dev/null +++ b/dist/types/billing_details.d.ts @@ -0,0 +1,12 @@ +export type BillingDetailsParams = { + billing_email: string; + country_code: string; + zip: string | number; + state_code?: string; + address1?: string; + address2?: string; + city?: string; + phone?: string; + company?: string; + vatnumber?: string; +}; diff --git a/dist/types/billing_details.js b/dist/types/billing_details.js new file mode 100644 index 00000000..100ecfa3 --- /dev/null +++ b/dist/types/billing_details.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=billing_details.js.map \ No newline at end of file diff --git a/dist/types/billing_details.js.map b/dist/types/billing_details.js.map new file mode 100644 index 00000000..9258175a --- /dev/null +++ b/dist/types/billing_details.js.map @@ -0,0 +1 @@ +{"version":3,"file":"billing_details.js","sourceRoot":"","sources":["../../src/types/billing_details.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/types/branches.d.ts b/dist/types/branches.d.ts new file mode 100644 index 00000000..bcafe649 --- /dev/null +++ b/dist/types/branches.d.ts @@ -0,0 +1,18 @@ +import { Branch } from "../interfaces/branch.js"; +export type BranchParams = { + name?: string; +}; +export type MergeBranchParams = { + force_conflict_resolve_using?: string; + target_branch_id?: number | string; +}; +export type BranchDeleted = { + project_id: string; + branch_deleted: boolean; +}; +export type BranchMerged = { + project_id: string; + branch_merged: boolean; + branch: Branch; + target_branch: Branch; +}; diff --git a/dist/types/branches.js b/dist/types/branches.js new file mode 100644 index 00000000..b7df49f8 --- /dev/null +++ b/dist/types/branches.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=branches.js.map \ No newline at end of file diff --git a/dist/types/branches.js.map b/dist/types/branches.js.map new file mode 100644 index 00000000..282c36a4 --- /dev/null +++ b/dist/types/branches.js.map @@ -0,0 +1 @@ +{"version":3,"file":"branches.js","sourceRoot":"","sources":["../../src/types/branches.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/types/cards.d.ts b/dist/types/cards.d.ts new file mode 100644 index 00000000..38bbd324 --- /dev/null +++ b/dist/types/cards.d.ts @@ -0,0 +1,10 @@ +export type CreateCardParams = { + number: string; + cvc: string | number; + exp_month: string | number; + exp_year: string | number; +}; +export type CardDeleted = { + card_id: string; + card_deleted: boolean; +}; diff --git a/dist/types/cards.js b/dist/types/cards.js new file mode 100644 index 00000000..70af0137 --- /dev/null +++ b/dist/types/cards.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=cards.js.map \ No newline at end of file diff --git a/dist/types/cards.js.map b/dist/types/cards.js.map new file mode 100644 index 00000000..a181ada1 --- /dev/null +++ b/dist/types/cards.js.map @@ -0,0 +1 @@ +{"version":3,"file":"cards.js","sourceRoot":"","sources":["../../src/types/cards.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/types/comments.d.ts b/dist/types/comments.d.ts new file mode 100644 index 00000000..ec17bd9a --- /dev/null +++ b/dist/types/comments.d.ts @@ -0,0 +1,15 @@ +import type { ProjectOnly, ProjectWithPagination } from "./common_get_params.js"; +export type CommentData = { + comment?: string; +}; +export type CommentDeleted = { + project_id: string; + comment_deleted: boolean; + branch?: string; +}; +export type ProjectAndKey = ProjectOnly & { + key_id: number | string; +}; +export type KeyProjectPagination = ProjectWithPagination & { + key_id: number | string; +}; diff --git a/dist/types/comments.js b/dist/types/comments.js new file mode 100644 index 00000000..d3edd944 --- /dev/null +++ b/dist/types/comments.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=comments.js.map \ No newline at end of file diff --git a/dist/types/comments.js.map b/dist/types/comments.js.map new file mode 100644 index 00000000..0a647e38 --- /dev/null +++ b/dist/types/comments.js.map @@ -0,0 +1 @@ +{"version":3,"file":"comments.js","sourceRoot":"","sources":["../../src/types/comments.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/types/common_get_params.d.ts b/dist/types/common_get_params.d.ts new file mode 100644 index 00000000..c111f2a0 --- /dev/null +++ b/dist/types/common_get_params.d.ts @@ -0,0 +1,11 @@ +export type TeamOnly = { + team_id: string | number; +}; +export type ProjectOnly = { + project_id: string; +}; +export type PaginationParams = { + page?: number; + limit?: number; +}; +export type ProjectWithPagination = ProjectOnly & PaginationParams; diff --git a/dist/types/common_get_params.js b/dist/types/common_get_params.js new file mode 100644 index 00000000..d39c3209 --- /dev/null +++ b/dist/types/common_get_params.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=common_get_params.js.map \ No newline at end of file diff --git a/dist/types/common_get_params.js.map b/dist/types/common_get_params.js.map new file mode 100644 index 00000000..31069bea --- /dev/null +++ b/dist/types/common_get_params.js.map @@ -0,0 +1 @@ +{"version":3,"file":"common_get_params.js","sourceRoot":"","sources":["../../src/types/common_get_params.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/types/contributors.d.ts b/dist/types/contributors.d.ts new file mode 100644 index 00000000..7cb30b5b --- /dev/null +++ b/dist/types/contributors.d.ts @@ -0,0 +1,24 @@ +import type { ContributorRights } from "./contributor_rights.js"; +export type ContributorLanguages = { + lang_iso: string; + is_writable?: boolean; +}; +export type ContributorCreateData = { + email: string; + fullname?: string; + is_admin?: boolean; + is_reviewer?: boolean; + languages: ContributorLanguages[]; + admin_rights?: ContributorRights[]; +}; +export type ContributorUpdateData = { + is_admin?: boolean; + is_reviewer?: boolean; + languages?: ContributorLanguages[]; + admin_rights?: ContributorRights[]; +}; +export type ContributorDeleted = { + project_id: string; + contributor_deleted: boolean; + branch?: string; +}; diff --git a/dist/types/contributors.js b/dist/types/contributors.js new file mode 100644 index 00000000..c9a4d30e --- /dev/null +++ b/dist/types/contributors.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=contributors.js.map \ No newline at end of file diff --git a/dist/types/contributors.js.map b/dist/types/contributors.js.map new file mode 100644 index 00000000..6c1420a9 --- /dev/null +++ b/dist/types/contributors.js.map @@ -0,0 +1 @@ +{"version":3,"file":"contributors.js","sourceRoot":"","sources":["../../src/types/contributors.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/types/files.d.ts b/dist/types/files.d.ts new file mode 100644 index 00000000..2f457b12 --- /dev/null +++ b/dist/types/files.d.ts @@ -0,0 +1,92 @@ +import type { FileFormat } from "./file_format.js"; +import type { ProjectWithPagination } from "./common_get_params.js"; +export type DownloadBundle = { + project_id: string; + bundle_url: string; + branch?: string; +}; +export type FileDeleted = { + project_id: string; + file_deleted: boolean; +}; +type LanguageMapping = { + original_language_iso: string; + custom_language_iso: string; +}; +type FilterData = "translated" | "untranslated" | "reviewed" | "reviewed_only" | "last_reviewed_only" | "verified" | "nonhidden"; +type ExportSort = "first_added" | "last_added" | "last_updated" | "a_z" | "z_a"; +type ExportEmptyAs = "empty" | "base" | "null" | "skip"; +type ExportNullAs = "null" | "empty"; +type Trigger = "amazons3" | "gcs" | "github" | "github-enterprise" | "gitlab" | "bitbucket" | "bitbucket-enterprise" | "azure"; +type PluralFormat = "json_string" | "icu" | "array" | "generic" | "symfony" | "i18next" | "i18next_v4"; +type PlaceholderFormat = "printf" | "ios" | "icu" | "net" | "symfony" | "i18n" | "raw"; +type Indentation = "default" | "1sp" | "2sp" | "3sp" | "4sp" | "5sp" | "6sp" | "7sp" | "8sp" | "tab"; +type JavaPropertiesEncoding = "utf-8" | "latin-1"; +export interface DownloadFileParams { + format: FileFormat; + original_filenames?: boolean; + bundle_structure?: string; + directory_prefix?: string; + all_platforms?: boolean; + filter_langs?: string[]; + filter_data?: FilterData[]; + filter_filenames?: string[]; + add_newline_eof?: boolean; + custom_translation_status_ids?: string[] | number[]; + include_tags?: string[]; + exclude_tags?: string[]; + export_sort?: ExportSort; + export_empty_as?: ExportEmptyAs; + export_null_as?: ExportNullAs; + include_comments?: boolean; + include_description?: boolean; + include_pids?: string[]; + triggers?: Trigger[]; + filter_repositories?: string[]; + replace_breaks?: boolean; + disable_references?: boolean; + plural_format?: PluralFormat; + placeholder_format?: PlaceholderFormat; + webhook_url?: string; + language_mapping?: LanguageMapping[]; + icu_numeric?: boolean; + escape_percent?: boolean; + indentation?: Indentation; + yaml_include_root?: boolean; + json_unescaped_slashes?: boolean; + java_properties_encoding?: JavaPropertiesEncoding; + java_properties_separator?: string; + bundle_description?: string; + filter_task_id?: number; + compact?: boolean; +} +export type UploadFileParams = { + data: string; + filename: string; + lang_iso: string; + convert_placeholders?: boolean; + detect_icu_plurals?: boolean; + tags?: string[]; + tag_inserted_keys?: boolean; + tag_updated_keys?: boolean; + tag_skipped_keys?: boolean; + replace_modified?: boolean; + slashn_to_linebreak?: boolean; + keys_to_values?: boolean; + distinguish_by_file?: boolean; + apply_tm?: boolean; + use_automations?: boolean; + hidden_from_contributors?: boolean; + cleanup_mode?: boolean; + custom_translation_status_ids?: string[] | number[]; + custom_translation_status_inserted_keys?: boolean; + custom_translation_status_updated_keys?: boolean; + custom_translation_status_skipped_keys?: boolean; + skip_detect_lang_iso?: boolean; + format?: FileFormat; + filter_task_id?: number; +}; +export type ListFileParams = ProjectWithPagination & { + filter_filename?: string; +}; +export {}; diff --git a/dist/types/files.js b/dist/types/files.js new file mode 100644 index 00000000..bc038777 --- /dev/null +++ b/dist/types/files.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=files.js.map \ No newline at end of file diff --git a/dist/types/files.js.map b/dist/types/files.js.map new file mode 100644 index 00000000..1c755a87 --- /dev/null +++ b/dist/types/files.js.map @@ -0,0 +1 @@ +{"version":3,"file":"files.js","sourceRoot":"","sources":["../../src/types/files.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/types/index.d.ts b/dist/types/index.d.ts index 2bc65419..56b366fe 100644 --- a/dist/types/index.d.ts +++ b/dist/types/index.d.ts @@ -1,73 +1,59 @@ -export { BulkUpdateKeyParams } from "./bulk_update_key_params.js"; -export { CommentData } from "./comment_data.js"; -export { CreateKeyData } from "./create_key_data.js"; -export { CreateKeyParams } from "./create_key_params.js"; -export { HttpMethod } from "./http_method.js"; -export { Filenames } from "./filenames.js"; -export { ScreenshotData } from "./screenshot_data.js"; -export { SupportedPlatforms } from "./supported_platforms.js"; -export { NumericBool } from "./numeric_bool.js"; -export { TeamUserParams } from "./team_user_params.js"; -export { TranslationData } from "./translation_data.js"; -export { UpdateKeyDataWithId } from "./update_key_data_with_id.js"; -export { UpdateKeyData } from "./update_key_data.js"; -export { OtaResourceDeleted } from "./ota_resource_deleted.js"; -export { UserGroupParams } from "./user_group_params.js"; -export { UpdateTaskParams } from "./update_task_params.js"; -export { CreateTaskParams } from "./create_task_params.js"; -export { TaskLanguage } from "./task_language.js"; -export { BranchParams } from "./branch_params.js"; -export { MergeBranchParams } from "./merge_branch_params.js"; -export { ContributorRights } from "./contributor_rights.js"; -export { ContributorLanguages } from "./contributor_languages.js"; -export { ContributorCreateData } from "./contributor_create_data.js"; -export { ContributorUpdateData } from "./contributor_update_data.js"; -export { DownloadBundle } from "./download_bundle.js"; -export { CreateLanguageParams } from "./create_language_params.js"; -export { UpdateLanguageParams } from "./update_language_params.js"; -export { CreateOrderParams } from "./create_order_params.js"; -export { CreateCardParams } from "./create_card_params.js"; -export { CreateProjectParams } from "./create_project_params.js"; -export { UpdateProjectParams } from "./update_project_params.js"; -export { CreateScreenshotParams } from "./create_screenshot_params.js"; -export { UpdateScreenshotParams } from "./update_screenshot_params.js"; -export { CreateSnapshotParams } from "./create_snapshot_params.js"; -export { BillingDetailsParams } from "./billing_details_params.js"; -export { CreateTranslationStatusParams } from "./create_translation_status_params.js"; -export { UpdateTranslationStatusParams } from "./update_translation_status_params.js"; -export { UpdateTranslationParams } from "./update_translation_params.js"; -export { WebhookEventLangMap } from "./webhook_event_lang_map.js"; -export { CreateWebhookParams } from "./create_webhook_params.js"; -export { UpdateWebhookParams } from "./update_webhook_params.js"; -export { WebhookProjectImported } from "./webhook_events/project_imported.js"; -export { WebhookProjectExported } from "./webhook_events/project_exported.js"; -export { WebhookProjectCopied } from "./webhook_events/project_copied.js"; -export { WebhookProjectDeleted } from "./webhook_events/project_deleted.js"; -export { WebhookProjectSnapshotCreated } from "./webhook_events/project_snapshot_created.js"; -export { WebhookProjectBranchAdded } from "./webhook_events/project_branch_added.js"; -export { WebhookProjectBranchDeleted } from "./webhook_events/project_branch_deleted.js"; -export { WebhookProjectBranchMerged } from "./webhook_events/project_branch_merged.js"; -export { WebhookProjectLanguagesAdded } from "./webhook_events/project_languages_added.js"; -export { WebhookProjectLanguageRemoved } from "./webhook_events/project_language_removed.js"; -export { WebhookProjectLanguageSettingsChanged } from "./webhook_events/project_language_settings_changed.js"; -export { WebhookProjectKeyAdded } from "./webhook_events/project_key_added.js"; -export { WebhookProjectKeysAdded } from "./webhook_events/project_keys_added.js"; -export { WebhookProjectKeyModified } from "./webhook_events/project_key_modified.js"; -export { WebhookProjectKeysModified } from "./webhook_events/project_keys_modified.js"; -export { WebhookProjectKeysDeleted } from "./webhook_events/project_keys_deleted.js"; -export { WebhookProjectKeyCommentAdded } from "./webhook_events/project_key_comment_added.js"; -export { WebhookProjectTranslationUpdated } from "./webhook_events/project_translation_updated.js"; -export { WebhookProjectTranslationsUpdated } from "./webhook_events/project_translations_updated.js"; -export { WebhookProjectTranslationProofread } from "./webhook_events/project_translation_proofread.js"; -export { WebhookProjectContributorAdded } from "./webhook_events/project_contributor_added.js"; -export { WebhookProjectContributorAddedPublic } from "./webhook_events/project_contributor_added_public.js"; -export { WebhookProjectContributorDeleted } from "./webhook_events/project_contributor_deleted.js"; -export { WebhookProjectTaskQueued } from "./webhook_events/project_task_queued.js"; -export { WebhookProjectTaskCreated } from "./webhook_events/project_task_created.js"; -export { WebhookProjectTaskClosed } from "./webhook_events/project_task_closed.js"; -export { WebhookProjectTaskDeleted } from "./webhook_events/project_task_deleted.js"; -export { WebhookProjectTaskLanguageClosed } from "./webhook_events/project_task_language_closed.js"; -export { WebhookTeamOrderCreated } from "./webhook_events/team_order_created.js"; -export { WebhookTeamOrderDeleted } from "./webhook_events/team_order_deleted.js"; -export { WebhookTeamOrderCompleted } from "./webhook_events/team_order_completed.js"; -export { WebhookProjectTaskInitialTmLeverageCalculated } from "./webhook_events/project_task_initial_tm_leverage_calculated.js"; +export type { BranchParams, MergeBranchParams, BranchDeleted, BranchMerged, } from "./branches.js"; +export type { CommentData, CommentDeleted, ProjectAndKey, KeyProjectPagination, } from "./comments.js"; +export type { ContributorCreateData, ContributorUpdateData, ContributorDeleted, ContributorLanguages, } from "./contributors.js"; +export type { ContributorRights } from "./contributor_rights.js"; +export type { DownloadBundle, FileDeleted, DownloadFileParams, ListFileParams, } from "./files.js"; +export type { CreateKeyData, CreateKeyParams, UpdateKeyData, BulkUpdateKeyParams, UpdateKeyDataWithId, KeyDeleted, KeysBulkDeleted, KeyParamsWithPagination, GetKeyParams, } from "./keys.js"; +export type { CreateLanguageParams, UpdateLanguageParams, LanguageDeleted, } from "./languages.js"; +export type { CreateOrderParams } from "./orders.js"; +export type { CreateCardParams, CardDeleted } from "./cards.js"; +export type { CreateProjectParams, UpdateProjectParams, ProjectDeleted, ProjectEmptied, ProjectListParams, } from "./projects.js"; +export type { CreateScreenshotParams, UpdateScreenshotParams, ScreenshotDeleted, ScreenshotData, } from "./screenshots.js"; +export type { GetSegmentParams, UpdateSegmentReqParams, UpdateSegmentBodyParams, ListSegmentParams, } from "./segments.js"; +export type { CreateSnapshotParams, SnapshotDeleted } from "./snapshots.js"; +export type { CreateTaskParams, TaskLanguage, UpdateTaskParams, TaskDeleted, ListTaskParams, } from "./tasks.js"; +export type { BillingDetailsParams } from "./billing_details.js"; +export type { TeamWithPagination } from "./teams.js"; +export type { TeamUserParams, TeamUserDeleted } from "./team_users.js"; +export type { CreateTranslationStatusParams, UpdateTranslationStatusParams, TranslationStatusDeleted, TranslationStatusColors, } from "./translation_statuses.js"; +export type { UpdateTranslationParams, TranslationData, ListTranslationParams, GetTranslationParams, } from "./translations.js"; +export type { UserGroupParams, UserGroupDeleted } from "./user_groups.js"; +export type { WebhookEventLangMap, CreateWebhookParams, UpdateWebhookParams, WebhookDeleted, WebhookRegenerated, } from "./webhooks.js"; +export type { OtaResourceDeleted, OtaTeamProject, OtaFramework, OtaTeamProjectFramework, OtaFreezePeriodParams, OtaUsageParams, OtaBundleUpdateData, OtaRequestBundleParams, OtaProjectFramework, } from "./ota.js"; +export type { TeamOnly, ProjectOnly, PaginationParams, ProjectWithPagination, } from "./common_get_params.js"; +export type { Filenames } from "./filenames.js"; +export type { SupportedPlatforms } from "./supported_platforms.js"; +export type { NumericBool } from "./numeric_bool.js"; +export type { HttpMethod } from "./http_method.js"; +export type { WebhookProjectImported } from "./webhook_events/project_imported.js"; +export type { WebhookProjectExported } from "./webhook_events/project_exported.js"; +export type { WebhookProjectCopied } from "./webhook_events/project_copied.js"; +export type { WebhookProjectDeleted } from "./webhook_events/project_deleted.js"; +export type { WebhookProjectSnapshotCreated } from "./webhook_events/project_snapshot_created.js"; +export type { WebhookProjectBranchAdded } from "./webhook_events/project_branch_added.js"; +export type { WebhookProjectBranchDeleted } from "./webhook_events/project_branch_deleted.js"; +export type { WebhookProjectBranchMerged } from "./webhook_events/project_branch_merged.js"; +export type { WebhookProjectLanguagesAdded } from "./webhook_events/project_languages_added.js"; +export type { WebhookProjectLanguageRemoved } from "./webhook_events/project_language_removed.js"; +export type { WebhookProjectLanguageSettingsChanged } from "./webhook_events/project_language_settings_changed.js"; +export type { WebhookProjectKeyAdded } from "./webhook_events/project_key_added.js"; +export type { WebhookProjectKeysAdded } from "./webhook_events/project_keys_added.js"; +export type { WebhookProjectKeyModified } from "./webhook_events/project_key_modified.js"; +export type { WebhookProjectKeysModified } from "./webhook_events/project_keys_modified.js"; +export type { WebhookProjectKeysDeleted } from "./webhook_events/project_keys_deleted.js"; +export type { WebhookProjectKeyCommentAdded } from "./webhook_events/project_key_comment_added.js"; +export type { WebhookProjectTranslationUpdated } from "./webhook_events/project_translation_updated.js"; +export type { WebhookProjectTranslationsUpdated } from "./webhook_events/project_translations_updated.js"; +export type { WebhookProjectTranslationProofread } from "./webhook_events/project_translation_proofread.js"; +export type { WebhookProjectContributorAdded } from "./webhook_events/project_contributor_added.js"; +export type { WebhookProjectContributorAddedPublic } from "./webhook_events/project_contributor_added_public.js"; +export type { WebhookProjectContributorDeleted } from "./webhook_events/project_contributor_deleted.js"; +export type { WebhookProjectTaskQueued } from "./webhook_events/project_task_queued.js"; +export type { WebhookProjectTaskCreated } from "./webhook_events/project_task_created.js"; +export type { WebhookProjectTaskClosed } from "./webhook_events/project_task_closed.js"; +export type { WebhookProjectTaskDeleted } from "./webhook_events/project_task_deleted.js"; +export type { WebhookProjectTaskLanguageClosed } from "./webhook_events/project_task_language_closed.js"; +export type { WebhookTeamOrderCreated } from "./webhook_events/team_order_created.js"; +export type { WebhookTeamOrderDeleted } from "./webhook_events/team_order_deleted.js"; +export type { WebhookTeamOrderCompleted } from "./webhook_events/team_order_completed.js"; +export type { WebhookProjectTaskInitialTmLeverageCalculated } from "./webhook_events/project_task_initial_tm_leverage_calculated.js"; diff --git a/dist/types/keys.d.ts b/dist/types/keys.d.ts new file mode 100644 index 00000000..fa20738b --- /dev/null +++ b/dist/types/keys.d.ts @@ -0,0 +1,70 @@ +import type { SupportedPlatforms } from "./supported_platforms.js"; +import type { Filenames, Filenames as Keynames } from "./filenames.js"; +import type { CommentData } from "./comments.js"; +import type { ScreenshotData } from "./screenshots.js"; +import type { TranslationData } from "./translations.js"; +import type { ProjectWithPagination, ProjectOnly } from "./common_get_params.js"; +import type { NumericBool } from "./numeric_bool.js"; +export type CreateKeyData = { + key_name: string | Keynames; + description?: string; + platforms: SupportedPlatforms[]; + filenames?: Filenames; + tags?: string[]; + comments?: CommentData[]; + screenshots?: ScreenshotData[]; + translations?: TranslationData[]; + is_plural?: boolean; + plural_name?: string; + is_hidden?: boolean; + is_archived?: boolean; + context?: string; + char_limit?: number; + custom_attributes?: string; +}; +export type CreateKeyParams = { + keys?: CreateKeyData[]; + use_automations?: boolean; +}; +export type UpdateKeyData = Omit & { + key_name?: string | Keynames; + merge_tags?: boolean; + platforms?: SupportedPlatforms[]; +}; +export type BulkUpdateKeyParams = { + keys?: UpdateKeyDataWithId[]; + use_automations?: boolean; +}; +export type UpdateKeyDataWithId = UpdateKeyData & { + key_id: string | number; +}; +export type KeyDeleted = { + project_id: string; + key_removed: boolean; + keys_locked?: number; + branch?: string; +}; +export type KeysBulkDeleted = { + project_id: string; + keys_removed: boolean; + keys_locked: number; + branch?: string; +}; +export type KeyParamsWithPagination = ProjectWithPagination & { + disable_references?: NumericBool; + include_comments?: NumericBool; + include_screenshots?: NumericBool; + include_translations?: NumericBool; + filter_translation_lang_ids?: string; + filter_tags?: string; + filter_filenames?: string; + filter_keys?: string; + filter_key_ids?: string; + filter_platforms?: string; + filter_untranslated?: NumericBool; + filter_qa_issues?: string; + filter_archived?: string; +}; +export type GetKeyParams = ProjectOnly & { + disable_references?: NumericBool; +}; diff --git a/dist/types/keys.js b/dist/types/keys.js new file mode 100644 index 00000000..0469340a --- /dev/null +++ b/dist/types/keys.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=keys.js.map \ No newline at end of file diff --git a/dist/types/keys.js.map b/dist/types/keys.js.map new file mode 100644 index 00000000..e7b3c031 --- /dev/null +++ b/dist/types/keys.js.map @@ -0,0 +1 @@ +{"version":3,"file":"keys.js","sourceRoot":"","sources":["../../src/types/keys.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/types/languages.d.ts b/dist/types/languages.d.ts new file mode 100644 index 00000000..4d0b9dc2 --- /dev/null +++ b/dist/types/languages.d.ts @@ -0,0 +1,16 @@ +export type CreateLanguageParams = { + lang_iso: string; + custom_iso?: string; + custom_name?: string; + custom_plural_forms?: string[]; +}; +export type UpdateLanguageParams = { + lang_iso?: string; + lang_name?: string; + plural_forms?: string[]; +}; +export type LanguageDeleted = { + project_id: string; + language_deleted: boolean; + branch?: string; +}; diff --git a/dist/types/languages.js b/dist/types/languages.js new file mode 100644 index 00000000..73b6d020 --- /dev/null +++ b/dist/types/languages.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=languages.js.map \ No newline at end of file diff --git a/dist/types/languages.js.map b/dist/types/languages.js.map new file mode 100644 index 00000000..7e610543 --- /dev/null +++ b/dist/types/languages.js.map @@ -0,0 +1 @@ +{"version":3,"file":"languages.js","sourceRoot":"","sources":["../../src/types/languages.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/types/orders.d.ts b/dist/types/orders.d.ts new file mode 100644 index 00000000..1cca0980 --- /dev/null +++ b/dist/types/orders.d.ts @@ -0,0 +1,15 @@ +export type CreateOrderParams = { + project_id: string; + branch?: string; + payment_method?: "credit_card" | "team_credit"; + card_id?: number | string; + briefing: string; + source_language_iso: string; + target_language_isos: string[]; + keys: string[] | number[]; + provider_slug: string; + translation_tier: number | string; + is_saved_to_translation_memory?: boolean; + dry_run?: boolean; + translation_style?: "formal" | "informal" | "business" | "friendly"; +}; diff --git a/dist/types/orders.js b/dist/types/orders.js new file mode 100644 index 00000000..f8e3568c --- /dev/null +++ b/dist/types/orders.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=orders.js.map \ No newline at end of file diff --git a/dist/types/orders.js.map b/dist/types/orders.js.map new file mode 100644 index 00000000..7796ab52 --- /dev/null +++ b/dist/types/orders.js.map @@ -0,0 +1 @@ +{"version":3,"file":"orders.js","sourceRoot":"","sources":["../../src/types/orders.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/types/ota.d.ts b/dist/types/ota.d.ts new file mode 100644 index 00000000..870f5655 --- /dev/null +++ b/dist/types/ota.d.ts @@ -0,0 +1,33 @@ +export type OtaResourceDeleted = { + id: number; + deleted: boolean; +}; +export type OtaTeamProject = { + teamId: number | string; + lokaliseProjectId: string; +}; +export type OtaFramework = { + framework: "ios_sdk" | "android_sdk" | "flutter_sdk"; +}; +export type OtaTeamProjectFramework = OtaTeamProject & OtaFramework; +export type OtaProjectFramework = OtaFramework & { + lokaliseProjectId: string; +}; +export type OtaFreezePeriodParams = { + from: string; + to: string; + bundleId: number | string; +}; +export type OtaUsageParams = { + dateFrom: string; + dateTo: string; + framework?: string; +}; +export type OtaBundleUpdateData = { + description: string; +}; +export type OtaRequestBundleParams = { + appVersion: string; + transVersion: number; + prerelease?: boolean; +}; diff --git a/dist/types/ota.js b/dist/types/ota.js new file mode 100644 index 00000000..fa56b305 --- /dev/null +++ b/dist/types/ota.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=ota.js.map \ No newline at end of file diff --git a/dist/types/ota.js.map b/dist/types/ota.js.map new file mode 100644 index 00000000..b3b19b40 --- /dev/null +++ b/dist/types/ota.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ota.js","sourceRoot":"","sources":["../../src/types/ota.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/types/projects.d.ts b/dist/types/projects.d.ts new file mode 100644 index 00000000..899023b1 --- /dev/null +++ b/dist/types/projects.d.ts @@ -0,0 +1,31 @@ +import type { PaginationParams } from "./common_get_params.js"; +export type CreateProjectParams = { + name: string; + team_id?: number | string; + description?: string; + languages?: Array<{ + lang_iso: string; + custom_iso?: string; + }>; + base_lang_iso?: string; + project_type?: "localization_files" | "paged_documents"; + is_segmentation_enabled?: boolean; +}; +export type UpdateProjectParams = { + name: string; + description?: string; +}; +export type ProjectDeleted = { + project_id: string; + project_deleted: boolean; +}; +export type ProjectEmptied = { + project_id: string; + keys_deleted: boolean; +}; +export type ProjectListParams = PaginationParams & { + filter_team_id?: number | string; + filter_names?: string; + include_statistics?: string | number; + include_settings?: string | number; +}; diff --git a/dist/types/projects.js b/dist/types/projects.js new file mode 100644 index 00000000..b79fd72a --- /dev/null +++ b/dist/types/projects.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=projects.js.map \ No newline at end of file diff --git a/dist/types/projects.js.map b/dist/types/projects.js.map new file mode 100644 index 00000000..55847ffd --- /dev/null +++ b/dist/types/projects.js.map @@ -0,0 +1 @@ +{"version":3,"file":"projects.js","sourceRoot":"","sources":["../../src/types/projects.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/types/screenshots.d.ts b/dist/types/screenshots.d.ts new file mode 100644 index 00000000..ee17da73 --- /dev/null +++ b/dist/types/screenshots.d.ts @@ -0,0 +1,20 @@ +export type CreateScreenshotParams = { + data: string; + title?: string; + description?: string; + ocr?: boolean; + key_ids?: string[] | number[]; + tags?: string[]; +}; +export type UpdateScreenshotParams = Omit; +export type ScreenshotDeleted = { + project_id: string; + screenshot_deleted: boolean; + branch?: string; +}; +export type ScreenshotData = { + title?: string; + description?: string; + screenshot_tags?: string[]; + data?: string; +}; diff --git a/dist/types/screenshots.js b/dist/types/screenshots.js new file mode 100644 index 00000000..1cf0d2ea --- /dev/null +++ b/dist/types/screenshots.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=screenshots.js.map \ No newline at end of file diff --git a/dist/types/screenshots.js.map b/dist/types/screenshots.js.map new file mode 100644 index 00000000..d6ff47df --- /dev/null +++ b/dist/types/screenshots.js.map @@ -0,0 +1 @@ +{"version":3,"file":"screenshots.js","sourceRoot":"","sources":["../../src/types/screenshots.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/types/segments.d.ts b/dist/types/segments.d.ts new file mode 100644 index 00000000..aae54e91 --- /dev/null +++ b/dist/types/segments.d.ts @@ -0,0 +1,19 @@ +export type GetSegmentParams = { + project_id: string; + key_id: number | string; + language_iso: string; + disable_references?: number | string; +}; +export type UpdateSegmentReqParams = Omit; +export type UpdateSegmentBodyParams = { + value: string; + is_fuzzy?: boolean; + is_reviewed?: boolean; + custom_translation_status_ids?: string[] | number[]; +}; +export type ListSegmentParams = GetSegmentParams & { + filter_is_reviewed?: number | string; + filter_unverified?: number | string; + filter_untranslated?: number | string; + filter_qa_issues?: string; +}; diff --git a/dist/types/segments.js b/dist/types/segments.js new file mode 100644 index 00000000..2409e60e --- /dev/null +++ b/dist/types/segments.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=segments.js.map \ No newline at end of file diff --git a/dist/types/segments.js.map b/dist/types/segments.js.map new file mode 100644 index 00000000..dc70593c --- /dev/null +++ b/dist/types/segments.js.map @@ -0,0 +1 @@ +{"version":3,"file":"segments.js","sourceRoot":"","sources":["../../src/types/segments.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/types/snapshots.d.ts b/dist/types/snapshots.d.ts new file mode 100644 index 00000000..b0c8e5a3 --- /dev/null +++ b/dist/types/snapshots.d.ts @@ -0,0 +1,8 @@ +export type CreateSnapshotParams = { + title: string; +}; +export type SnapshotDeleted = { + project_id: string; + snapshot_deleted: boolean; + branch?: string; +}; diff --git a/dist/types/snapshots.js b/dist/types/snapshots.js new file mode 100644 index 00000000..46ca58ee --- /dev/null +++ b/dist/types/snapshots.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=snapshots.js.map \ No newline at end of file diff --git a/dist/types/snapshots.js.map b/dist/types/snapshots.js.map new file mode 100644 index 00000000..03850b7c --- /dev/null +++ b/dist/types/snapshots.js.map @@ -0,0 +1 @@ +{"version":3,"file":"snapshots.js","sourceRoot":"","sources":["../../src/types/snapshots.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/types/tasks.d.ts b/dist/types/tasks.d.ts new file mode 100644 index 00000000..4bd17e82 --- /dev/null +++ b/dist/types/tasks.d.ts @@ -0,0 +1,38 @@ +import type { ProjectWithPagination } from "./common_get_params.js"; +export type TaskLanguage = { + language_iso: string; + users?: string[] | number[]; + groups?: string[] | number[]; +}; +export type CreateTaskParams = { + title: string; + description?: string; + due_date?: string; + keys?: string[] | number[]; + languages?: Array; + source_language_iso?: string; + auto_close_languages?: boolean; + auto_close_task?: boolean; + auto_close_items?: boolean; + task_type?: string; + parent_task_id?: string | number; + closing_tags?: string[]; + do_lock_translations?: boolean; + custom_translation_status_ids?: string[] | number[]; +}; +export type UpdateTaskParams = Omit & { + title?: string; + close_task?: boolean; + languages?: Array; +}; +export type TaskDeleted = { + project_id: string; + task_deleted: boolean; + branch?: string; +}; +export type ListTaskParams = ProjectWithPagination & { + filter_title?: string; + filter_statuses?: string; +}; diff --git a/dist/types/tasks.js b/dist/types/tasks.js new file mode 100644 index 00000000..f08b21fe --- /dev/null +++ b/dist/types/tasks.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=tasks.js.map \ No newline at end of file diff --git a/dist/types/tasks.js.map b/dist/types/tasks.js.map new file mode 100644 index 00000000..b2514d07 --- /dev/null +++ b/dist/types/tasks.js.map @@ -0,0 +1 @@ +{"version":3,"file":"tasks.js","sourceRoot":"","sources":["../../src/types/tasks.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/types/team_users.d.ts b/dist/types/team_users.d.ts new file mode 100644 index 00000000..a23a2ae7 --- /dev/null +++ b/dist/types/team_users.d.ts @@ -0,0 +1,7 @@ +export type TeamUserParams = { + role?: "owner" | "admin" | "member" | "biller"; +}; +export type TeamUserDeleted = { + team_id: string; + team_user_deleted: boolean; +}; diff --git a/dist/types/team_users.js b/dist/types/team_users.js new file mode 100644 index 00000000..3514b523 --- /dev/null +++ b/dist/types/team_users.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=team_users.js.map \ No newline at end of file diff --git a/dist/types/team_users.js.map b/dist/types/team_users.js.map new file mode 100644 index 00000000..a9ccd917 --- /dev/null +++ b/dist/types/team_users.js.map @@ -0,0 +1 @@ +{"version":3,"file":"team_users.js","sourceRoot":"","sources":["../../src/types/team_users.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/types/teams.d.ts b/dist/types/teams.d.ts new file mode 100644 index 00000000..5fc2ae7e --- /dev/null +++ b/dist/types/teams.d.ts @@ -0,0 +1,2 @@ +import type { TeamOnly, PaginationParams } from "./common_get_params.js"; +export type TeamWithPagination = TeamOnly & PaginationParams; diff --git a/dist/types/teams.js b/dist/types/teams.js new file mode 100644 index 00000000..073d3571 --- /dev/null +++ b/dist/types/teams.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=teams.js.map \ No newline at end of file diff --git a/dist/types/teams.js.map b/dist/types/teams.js.map new file mode 100644 index 00000000..b6fcd740 --- /dev/null +++ b/dist/types/teams.js.map @@ -0,0 +1 @@ +{"version":3,"file":"teams.js","sourceRoot":"","sources":["../../src/types/teams.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/types/translation_statuses.d.ts b/dist/types/translation_statuses.d.ts new file mode 100644 index 00000000..0a489978 --- /dev/null +++ b/dist/types/translation_statuses.d.ts @@ -0,0 +1,16 @@ +export type CreateTranslationStatusParams = { + title: string; + color: string; +}; +export type UpdateTranslationStatusParams = { + title?: string; + color?: string; +}; +export type TranslationStatusDeleted = { + project_id: string; + custom_translation_status_deleted: boolean; + branch?: string; +}; +export type TranslationStatusColors = { + colors: string[]; +}; diff --git a/dist/types/translation_statuses.js b/dist/types/translation_statuses.js new file mode 100644 index 00000000..31271aa6 --- /dev/null +++ b/dist/types/translation_statuses.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=translation_statuses.js.map \ No newline at end of file diff --git a/dist/types/translation_statuses.js.map b/dist/types/translation_statuses.js.map new file mode 100644 index 00000000..f96d4174 --- /dev/null +++ b/dist/types/translation_statuses.js.map @@ -0,0 +1 @@ +{"version":3,"file":"translation_statuses.js","sourceRoot":"","sources":["../../src/types/translation_statuses.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/types/translations.d.ts b/dist/types/translations.d.ts new file mode 100644 index 00000000..9317e1d6 --- /dev/null +++ b/dist/types/translations.d.ts @@ -0,0 +1,27 @@ +import { Keyable } from "../interfaces/keyable.js"; +import type { ProjectWithPagination, ProjectOnly } from "./common_get_params.js"; +export type TranslationData = { + language_iso?: string; + translation?: string | Keyable; + is_reviewed?: boolean; + is_unverified?: boolean; + custom_translation_status_ids?: string[] | number[]; +}; +export type UpdateTranslationParams = { + translation: string; + is_unverified?: boolean; + is_reviewed?: boolean; + custom_translation_status_ids?: string[] | number[]; +}; +export type ListTranslationParams = ProjectWithPagination & { + disable_references?: number | string; + filter_lang_id?: number | string; + filter_is_reviewed?: number | string; + filter_unverified?: number | string; + filter_untranslated?: number | string; + filter_qa_issues?: string; + filter_active_task_id?: number | string; +}; +export type GetTranslationParams = ProjectOnly & { + disable_references?: number | string; +}; diff --git a/dist/types/translations.js b/dist/types/translations.js new file mode 100644 index 00000000..39001eaa --- /dev/null +++ b/dist/types/translations.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=translations.js.map \ No newline at end of file diff --git a/dist/types/translations.js.map b/dist/types/translations.js.map new file mode 100644 index 00000000..1391f05f --- /dev/null +++ b/dist/types/translations.js.map @@ -0,0 +1 @@ +{"version":3,"file":"translations.js","sourceRoot":"","sources":["../../src/types/translations.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/types/user_groups.d.ts b/dist/types/user_groups.d.ts new file mode 100644 index 00000000..b8fbd92a --- /dev/null +++ b/dist/types/user_groups.d.ts @@ -0,0 +1,17 @@ +type GroupLanguages = { + reference: string[]; + contributable: string[]; +}; +export type AdminRights = "upload" | "activity" | "download" | "settings" | "create_branches" | "statistics" | "keys" | "screenshots" | "glossary" | "contributors" | "languages" | "tasks"; +export type UserGroupParams = { + name: string; + is_reviewer: boolean; + is_admin: boolean; + admin_rights?: AdminRights[]; + languages?: GroupLanguages; +}; +export type UserGroupDeleted = { + team_id: string; + group_deleted: boolean; +}; +export {}; diff --git a/dist/types/user_groups.js b/dist/types/user_groups.js new file mode 100644 index 00000000..6e00f6f1 --- /dev/null +++ b/dist/types/user_groups.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=user_groups.js.map \ No newline at end of file diff --git a/dist/types/user_groups.js.map b/dist/types/user_groups.js.map new file mode 100644 index 00000000..6e123625 --- /dev/null +++ b/dist/types/user_groups.js.map @@ -0,0 +1 @@ +{"version":3,"file":"user_groups.js","sourceRoot":"","sources":["../../src/types/user_groups.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/types/webhook_events/project_exported.d.ts b/dist/types/webhook_events/project_exported.d.ts index 13c91275..1c6db141 100644 --- a/dist/types/webhook_events/project_exported.d.ts +++ b/dist/types/webhook_events/project_exported.d.ts @@ -1,4 +1,4 @@ -import { SupportedPlatforms } from "../supported_platforms.js"; +import type { SupportedPlatforms } from "../supported_platforms.js"; export type WebhookProjectExported = { event: "project.exported"; export: { diff --git a/dist/types/webhook_events/project_key_added.d.ts b/dist/types/webhook_events/project_key_added.d.ts index ebf2687b..b846a4d3 100644 --- a/dist/types/webhook_events/project_key_added.d.ts +++ b/dist/types/webhook_events/project_key_added.d.ts @@ -1,4 +1,4 @@ -import { Filenames } from "../filenames.js"; +import type { Filenames } from "../filenames.js"; export type WebhookProjectKeyAdded = { event: "project.key.added"; key: { diff --git a/dist/types/webhook_events/project_key_comment_added.d.ts b/dist/types/webhook_events/project_key_comment_added.d.ts index 694d56b2..e84e0b60 100644 --- a/dist/types/webhook_events/project_key_comment_added.d.ts +++ b/dist/types/webhook_events/project_key_comment_added.d.ts @@ -1,4 +1,4 @@ -import { Filenames } from "../filenames.js"; +import type { Filenames } from "../filenames.js"; export type WebhookProjectKeyCommentAdded = { event: "project.key.comment.added"; comment: { diff --git a/dist/types/webhook_events/project_key_modified.d.ts b/dist/types/webhook_events/project_key_modified.d.ts index 797a57ef..e31359e2 100644 --- a/dist/types/webhook_events/project_key_modified.d.ts +++ b/dist/types/webhook_events/project_key_modified.d.ts @@ -1,4 +1,4 @@ -import { Filenames } from "../filenames.js"; +import type { Filenames } from "../filenames.js"; export type WebhookProjectKeyModified = { event: "project.key.modified"; key: { diff --git a/dist/types/webhook_events/project_keys_added.d.ts b/dist/types/webhook_events/project_keys_added.d.ts index da6c9780..6a961be5 100644 --- a/dist/types/webhook_events/project_keys_added.d.ts +++ b/dist/types/webhook_events/project_keys_added.d.ts @@ -1,4 +1,4 @@ -import { Filenames } from "../filenames.js"; +import type { Filenames } from "../filenames.js"; export type WebhookProjectKeysAdded = { event: "project.keys.added"; action?: "string"; diff --git a/dist/types/webhook_events/project_keys_deleted.d.ts b/dist/types/webhook_events/project_keys_deleted.d.ts index 25b792ee..07464cf7 100644 --- a/dist/types/webhook_events/project_keys_deleted.d.ts +++ b/dist/types/webhook_events/project_keys_deleted.d.ts @@ -1,4 +1,4 @@ -import { Filenames } from "../filenames.js"; +import type { Filenames } from "../filenames.js"; export type WebhookProjectKeysDeleted = { event: "project.keys.deleted"; action?: string; diff --git a/dist/types/webhook_events/project_keys_modified.d.ts b/dist/types/webhook_events/project_keys_modified.d.ts index b47f4987..7d030a07 100644 --- a/dist/types/webhook_events/project_keys_modified.d.ts +++ b/dist/types/webhook_events/project_keys_modified.d.ts @@ -1,4 +1,4 @@ -import { Filenames } from "../filenames.js"; +import type { Filenames } from "../filenames.js"; export type WebhookProjectKeysModified = { event: "project.keys.modified"; action?: string; diff --git a/dist/types/webhook_events/project_translation_proofread.d.ts b/dist/types/webhook_events/project_translation_proofread.d.ts index 4a13c5cc..73a9ba86 100644 --- a/dist/types/webhook_events/project_translation_proofread.d.ts +++ b/dist/types/webhook_events/project_translation_proofread.d.ts @@ -1,4 +1,4 @@ -import { Filenames } from "../filenames.js"; +import type { Filenames } from "../filenames.js"; export type WebhookProjectTranslationProofread = { event: "project.translation.proofread"; translation: { diff --git a/dist/types/webhook_events/project_translation_updated.d.ts b/dist/types/webhook_events/project_translation_updated.d.ts index 1a6bdd68..163e305d 100644 --- a/dist/types/webhook_events/project_translation_updated.d.ts +++ b/dist/types/webhook_events/project_translation_updated.d.ts @@ -1,4 +1,4 @@ -import { Filenames } from "../filenames.js"; +import type { Filenames } from "../filenames.js"; export type WebhookProjectTranslationUpdated = { event: "project.translation.updated"; translation: { diff --git a/dist/types/webhooks.d.ts b/dist/types/webhooks.d.ts new file mode 100644 index 00000000..9fbf07dd --- /dev/null +++ b/dist/types/webhooks.d.ts @@ -0,0 +1,22 @@ +export type WebhookEventLangMap = { + event?: string; + lang_iso_codes?: string[]; +}; +export type CreateWebhookParams = { + url: string; + branch?: string; + events: string[]; + event_lang_map?: WebhookEventLangMap[]; +}; +export type UpdateWebhookParams = Omit & { + url?: string; + events?: string[]; +}; +export type WebhookDeleted = { + project_id: string; + webhook_deleted: boolean; +}; +export type WebhookRegenerated = { + project_id: string; + secret: string; +}; diff --git a/dist/types/webhooks.js b/dist/types/webhooks.js new file mode 100644 index 00000000..720d4aa1 --- /dev/null +++ b/dist/types/webhooks.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=webhooks.js.map \ No newline at end of file diff --git a/dist/types/webhooks.js.map b/dist/types/webhooks.js.map new file mode 100644 index 00000000..42ec3133 --- /dev/null +++ b/dist/types/webhooks.js.map @@ -0,0 +1 @@ +{"version":3,"file":"webhooks.js","sourceRoot":"","sources":["../../src/types/webhooks.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/docs/additional_info/changelog.md b/docs/additional_info/changelog.md index 5434200a..b310433a 100644 --- a/docs/additional_info/changelog.md +++ b/docs/additional_info/changelog.md @@ -1,5 +1,9 @@ # Changelog +## 12.4.0 + +* Enhance typings, export more types, various fixes + ## 12.3.0 (19-Mar-2024) * Our SDK now exports types for [webhook events](https://lokalise.github.io/node-lokalise-api/additional_info/webhook_events). diff --git a/package-lock.json b/package-lock.json index 72cad18e..7e5890aa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@lokalise/node-api", - "version": "12.3.0", + "version": "12.4.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@lokalise/node-api", - "version": "12.3.0", + "version": "12.4.0", "license": "BSD-3-Clause", "devDependencies": { "@types/node": "^20.1.2", @@ -55,12 +55,12 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.1.tgz", - "integrity": "sha512-bC49z4spJQR3j8vFtJBLqzyzFV0ciuL5HYX7qfSl3KEqeMVV+eTquRvmXxpvB0AMubRrvv7y5DILiLLPi57Ewg==", + "version": "7.24.2", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.2.tgz", + "integrity": "sha512-y5+tLQyV8pg3fsiln67BVLD1P13Eg4lh5RW9mF0zUuvLrv9uIQ4MCL+CRT+FTsBlBjcIan6PGsLcBN0m3ClUyQ==", "dev": true, "dependencies": { - "@babel/highlight": "^7.24.1", + "@babel/highlight": "^7.24.2", "picocolors": "^1.0.0" }, "engines": { @@ -77,13 +77,13 @@ } }, "node_modules/@babel/core": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.1.tgz", - "integrity": "sha512-F82udohVyIgGAY2VVj/g34TpFUG606rumIHjTfVbssPg2zTR7PuuEpZcX8JA6sgBfIYmJrFtWgPvHQuJamVqZQ==", + "version": "7.24.3", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.3.tgz", + "integrity": "sha512-5FcvN1JHw2sHJChotgx8Ek0lyuh4kCKelgMTTqhYJJtloNvUfpAFMeNQUtdlIaktwrSV9LtCdqwk48wL2wBacQ==", "dev": true, "dependencies": { "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.24.1", + "@babel/code-frame": "^7.24.2", "@babel/generator": "^7.24.1", "@babel/helper-compilation-targets": "^7.23.6", "@babel/helper-module-transforms": "^7.23.3", @@ -190,9 +190,9 @@ } }, "node_modules/@babel/helper-module-imports": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.24.1.tgz", - "integrity": "sha512-HfEWzysMyOa7xI5uQHc/OcZf67/jc+xe/RZlznWQHhbb8Pg1SkRdbK4yEi61aY8wxQA7PkSfoojtLQP/Kpe3og==", + "version": "7.24.3", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.24.3.tgz", + "integrity": "sha512-viKb0F9f2s0BCS22QSF308z/+1YWKV/76mwt61NBzS5izMzDPwdq1pTrzf+Li3npBWX9KdQbkeCt1jSAM7lZqg==", "dev": true, "dependencies": { "@babel/types": "^7.24.0" @@ -286,9 +286,9 @@ } }, "node_modules/@babel/highlight": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.1.tgz", - "integrity": "sha512-EPmDPxidWe/Ex+HTFINpvXdPHRmgSF3T8hGvzondYjmgzTQ/0EbLpSxyt+w3zzlYSk9cNBQNF9k0dT5Z2NiBjw==", + "version": "7.24.2", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.2.tgz", + "integrity": "sha512-Yac1ao4flkTxTteCDZLEvdxg2fZfz1v8M4QpaGypq/WPDqg3ijHYbDfs+LG5hvzSoqaSZ9/Z9lKSP3CjZjv+pA==", "dev": true, "dependencies": { "@babel/helper-validator-identifier": "^7.22.20", @@ -464,9 +464,9 @@ } }, "node_modules/@esbuild/aix-ppc64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.19.12.tgz", - "integrity": "sha512-bmoCYyWdEL3wDQIVbcyzRyeKLgk2WtWLTWz1ZIAZF/EGbNOwSA6ew3PftJ1PqMiOOGu0OyFMzG53L0zqIpPeNA==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.20.2.tgz", + "integrity": "sha512-D+EBOJHXdNZcLJRBkhENNG8Wji2kgc9AZ9KiPr1JuZjsNtyHzrsfLRrY0tk2H2aoFu6RANO1y1iPPUCDYWkb5g==", "cpu": [ "ppc64" ], @@ -480,9 +480,9 @@ } }, "node_modules/@esbuild/android-arm": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.12.tgz", - "integrity": "sha512-qg/Lj1mu3CdQlDEEiWrlC4eaPZ1KztwGJ9B6J+/6G+/4ewxJg7gqj8eVYWvao1bXrqGiW2rsBZFSX3q2lcW05w==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.20.2.tgz", + "integrity": "sha512-t98Ra6pw2VaDhqNWO2Oph2LXbz/EJcnLmKLGBJwEwXX/JAN83Fym1rU8l0JUWK6HkIbWONCSSatf4sf2NBRx/w==", "cpu": [ "arm" ], @@ -496,9 +496,9 @@ } }, "node_modules/@esbuild/android-arm64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.12.tgz", - "integrity": "sha512-P0UVNGIienjZv3f5zq0DP3Nt2IE/3plFzuaS96vihvD0Hd6H/q4WXUGpCxD/E8YrSXfNyRPbpTq+T8ZQioSuPA==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.20.2.tgz", + "integrity": "sha512-mRzjLacRtl/tWU0SvD8lUEwb61yP9cqQo6noDZP/O8VkwafSYwZ4yWy24kan8jE/IMERpYncRt2dw438LP3Xmg==", "cpu": [ "arm64" ], @@ -512,9 +512,9 @@ } }, "node_modules/@esbuild/android-x64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.12.tgz", - "integrity": "sha512-3k7ZoUW6Q6YqhdhIaq/WZ7HwBpnFBlW905Fa4s4qWJyiNOgT1dOqDiVAQFwBH7gBRZr17gLrlFCRzF6jFh7Kew==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.20.2.tgz", + "integrity": "sha512-btzExgV+/lMGDDa194CcUQm53ncxzeBrWJcncOBxuC6ndBkKxnHdFJn86mCIgTELsooUmwUm9FkhSp5HYu00Rg==", "cpu": [ "x64" ], @@ -528,9 +528,9 @@ } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.12.tgz", - "integrity": "sha512-B6IeSgZgtEzGC42jsI+YYu9Z3HKRxp8ZT3cqhvliEHovq8HSX2YX8lNocDn79gCKJXOSaEot9MVYky7AKjCs8g==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.20.2.tgz", + "integrity": "sha512-4J6IRT+10J3aJH3l1yzEg9y3wkTDgDk7TSDFX+wKFiWjqWp/iCfLIYzGyasx9l0SAFPT1HwSCR+0w/h1ES/MjA==", "cpu": [ "arm64" ], @@ -544,9 +544,9 @@ } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.12.tgz", - "integrity": "sha512-hKoVkKzFiToTgn+41qGhsUJXFlIjxI/jSYeZf3ugemDYZldIXIxhvwN6erJGlX4t5h417iFuheZ7l+YVn05N3A==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.20.2.tgz", + "integrity": "sha512-tBcXp9KNphnNH0dfhv8KYkZhjc+H3XBkF5DKtswJblV7KlT9EI2+jeA8DgBjp908WEuYll6pF+UStUCfEpdysA==", "cpu": [ "x64" ], @@ -560,9 +560,9 @@ } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.12.tgz", - "integrity": "sha512-4aRvFIXmwAcDBw9AueDQ2YnGmz5L6obe5kmPT8Vd+/+x/JMVKCgdcRwH6APrbpNXsPz+K653Qg8HB/oXvXVukA==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.20.2.tgz", + "integrity": "sha512-d3qI41G4SuLiCGCFGUrKsSeTXyWG6yem1KcGZVS+3FYlYhtNoNgYrWcvkOoaqMhwXSMrZRl69ArHsGJ9mYdbbw==", "cpu": [ "arm64" ], @@ -576,9 +576,9 @@ } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.12.tgz", - "integrity": "sha512-EYoXZ4d8xtBoVN7CEwWY2IN4ho76xjYXqSXMNccFSx2lgqOG/1TBPW0yPx1bJZk94qu3tX0fycJeeQsKovA8gg==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.20.2.tgz", + "integrity": "sha512-d+DipyvHRuqEeM5zDivKV1KuXn9WeRX6vqSqIDgwIfPQtwMP4jaDsQsDncjTDDsExT4lR/91OLjRo8bmC1e+Cw==", "cpu": [ "x64" ], @@ -592,9 +592,9 @@ } }, "node_modules/@esbuild/linux-arm": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.12.tgz", - "integrity": "sha512-J5jPms//KhSNv+LO1S1TX1UWp1ucM6N6XuL6ITdKWElCu8wXP72l9MM0zDTzzeikVyqFE6U8YAV9/tFyj0ti+w==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.20.2.tgz", + "integrity": "sha512-VhLPeR8HTMPccbuWWcEUD1Az68TqaTYyj6nfE4QByZIQEQVWBB8vup8PpR7y1QHL3CpcF6xd5WVBU/+SBEvGTg==", "cpu": [ "arm" ], @@ -608,9 +608,9 @@ } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.12.tgz", - "integrity": "sha512-EoTjyYyLuVPfdPLsGVVVC8a0p1BFFvtpQDB/YLEhaXyf/5bczaGeN15QkR+O4S5LeJ92Tqotve7i1jn35qwvdA==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.20.2.tgz", + "integrity": "sha512-9pb6rBjGvTFNira2FLIWqDk/uaf42sSyLE8j1rnUpuzsODBq7FvpwHYZxQ/It/8b+QOS1RYfqgGFNLRI+qlq2A==", "cpu": [ "arm64" ], @@ -624,9 +624,9 @@ } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.12.tgz", - "integrity": "sha512-Thsa42rrP1+UIGaWz47uydHSBOgTUnwBwNq59khgIwktK6x60Hivfbux9iNR0eHCHzOLjLMLfUMLCypBkZXMHA==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.20.2.tgz", + "integrity": "sha512-o10utieEkNPFDZFQm9CoP7Tvb33UutoJqg3qKf1PWVeeJhJw0Q347PxMvBgVVFgouYLGIhFYG0UGdBumROyiig==", "cpu": [ "ia32" ], @@ -640,9 +640,9 @@ } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.12.tgz", - "integrity": "sha512-LiXdXA0s3IqRRjm6rV6XaWATScKAXjI4R4LoDlvO7+yQqFdlr1Bax62sRwkVvRIrwXxvtYEHHI4dm50jAXkuAA==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.20.2.tgz", + "integrity": "sha512-PR7sp6R/UC4CFVomVINKJ80pMFlfDfMQMYynX7t1tNTeivQ6XdX5r2XovMmha/VjR1YN/HgHWsVcTRIMkymrgQ==", "cpu": [ "loong64" ], @@ -656,9 +656,9 @@ } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.12.tgz", - "integrity": "sha512-fEnAuj5VGTanfJ07ff0gOA6IPsvrVHLVb6Lyd1g2/ed67oU1eFzL0r9WL7ZzscD+/N6i3dWumGE1Un4f7Amf+w==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.20.2.tgz", + "integrity": "sha512-4BlTqeutE/KnOiTG5Y6Sb/Hw6hsBOZapOVF6njAESHInhlQAghVVZL1ZpIctBOoTFbQyGW+LsVYZ8lSSB3wkjA==", "cpu": [ "mips64el" ], @@ -672,9 +672,9 @@ } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.12.tgz", - "integrity": "sha512-nYJA2/QPimDQOh1rKWedNOe3Gfc8PabU7HT3iXWtNUbRzXS9+vgB0Fjaqr//XNbd82mCxHzik2qotuI89cfixg==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.20.2.tgz", + "integrity": "sha512-rD3KsaDprDcfajSKdn25ooz5J5/fWBylaaXkuotBDGnMnDP1Uv5DLAN/45qfnf3JDYyJv/ytGHQaziHUdyzaAg==", "cpu": [ "ppc64" ], @@ -688,9 +688,9 @@ } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.12.tgz", - "integrity": "sha512-2MueBrlPQCw5dVJJpQdUYgeqIzDQgw3QtiAHUC4RBz9FXPrskyyU3VI1hw7C0BSKB9OduwSJ79FTCqtGMWqJHg==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.20.2.tgz", + "integrity": "sha512-snwmBKacKmwTMmhLlz/3aH1Q9T8v45bKYGE3j26TsaOVtjIag4wLfWSiZykXzXuE1kbCE+zJRmwp+ZbIHinnVg==", "cpu": [ "riscv64" ], @@ -704,9 +704,9 @@ } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.12.tgz", - "integrity": "sha512-+Pil1Nv3Umes4m3AZKqA2anfhJiVmNCYkPchwFJNEJN5QxmTs1uzyy4TvmDrCRNT2ApwSari7ZIgrPeUx4UZDg==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.20.2.tgz", + "integrity": "sha512-wcWISOobRWNm3cezm5HOZcYz1sKoHLd8VL1dl309DiixxVFoFe/o8HnwuIwn6sXre88Nwj+VwZUvJf4AFxkyrQ==", "cpu": [ "s390x" ], @@ -720,9 +720,9 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.12.tgz", - "integrity": "sha512-B71g1QpxfwBvNrfyJdVDexenDIt1CiDN1TIXLbhOw0KhJzE78KIFGX6OJ9MrtC0oOqMWf+0xop4qEU8JrJTwCg==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.20.2.tgz", + "integrity": "sha512-1MdwI6OOTsfQfek8sLwgyjOXAu+wKhLEoaOLTjbijk6E2WONYpH9ZU2mNtR+lZ2B4uwr+usqGuVfFT9tMtGvGw==", "cpu": [ "x64" ], @@ -736,9 +736,9 @@ } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.12.tgz", - "integrity": "sha512-3ltjQ7n1owJgFbuC61Oj++XhtzmymoCihNFgT84UAmJnxJfm4sYCiSLTXZtE00VWYpPMYc+ZQmB6xbSdVh0JWA==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.20.2.tgz", + "integrity": "sha512-K8/DhBxcVQkzYc43yJXDSyjlFeHQJBiowJ0uVL6Tor3jGQfSGHNNJcWxNbOI8v5k82prYqzPuwkzHt3J1T1iZQ==", "cpu": [ "x64" ], @@ -752,9 +752,9 @@ } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.12.tgz", - "integrity": "sha512-RbrfTB9SWsr0kWmb9srfF+L933uMDdu9BIzdA7os2t0TXhCRjrQyCeOt6wVxr79CKD4c+p+YhCj31HBkYcXebw==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.20.2.tgz", + "integrity": "sha512-eMpKlV0SThJmmJgiVyN9jTPJ2VBPquf6Kt/nAoo6DgHAoN57K15ZghiHaMvqjCye/uU4X5u3YSMgVBI1h3vKrQ==", "cpu": [ "x64" ], @@ -768,9 +768,9 @@ } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.12.tgz", - "integrity": "sha512-HKjJwRrW8uWtCQnQOz9qcU3mUZhTUQvi56Q8DPTLLB+DawoiQdjsYq+j+D3s9I8VFtDr+F9CjgXKKC4ss89IeA==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.20.2.tgz", + "integrity": "sha512-2UyFtRC6cXLyejf/YEld4Hajo7UHILetzE1vsRcGL3earZEW77JxrFjH4Ez2qaTiEfMgAXxfAZCm1fvM/G/o8w==", "cpu": [ "x64" ], @@ -784,9 +784,9 @@ } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.12.tgz", - "integrity": "sha512-URgtR1dJnmGvX864pn1B2YUYNzjmXkuJOIqG2HdU62MVS4EHpU2946OZoTMnRUHklGtJdJZ33QfzdjGACXhn1A==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.20.2.tgz", + "integrity": "sha512-GRibxoawM9ZCnDxnP3usoUDO9vUkpAxIIZ6GQI+IlVmr5kP3zUq+l17xELTHMWTWzjxa2guPNyrpq1GWmPvcGQ==", "cpu": [ "arm64" ], @@ -800,9 +800,9 @@ } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.12.tgz", - "integrity": "sha512-+ZOE6pUkMOJfmxmBZElNOx72NKpIa/HFOMGzu8fqzQJ5kgf6aTGrcJaFsNiVMH4JKpMipyK+7k0n2UXN7a8YKQ==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.20.2.tgz", + "integrity": "sha512-HfLOfn9YWmkSKRQqovpnITazdtquEW8/SoHW7pWpuEeguaZI4QnCRW6b+oZTztdBnZOS2hqJ6im/D5cPzBTTlQ==", "cpu": [ "ia32" ], @@ -816,9 +816,9 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.12.tgz", - "integrity": "sha512-T1QyPSDCyMXaO3pzBkF96E8xMkiRYbUEZADd29SyPGabqxMViNoii+NcK7eWJAEoU6RZyEm5lVSIjTmcdoB9HA==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.20.2.tgz", + "integrity": "sha512-N49X4lJX27+l9jbLKSqZ6bKNjzQvHaT8IIFUy+YIqmXQdjYCToGWwOItDrfby14c78aDd5NHQl29xingXfCdLQ==", "cpu": [ "x64" ], @@ -1300,9 +1300,9 @@ "dev": true }, "node_modules/@tsconfig/node10": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", - "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==", + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.10.tgz", + "integrity": "sha512-PiaIWIoPvO6qm6t114ropMCagj6YAF24j9OkCA2mJDXFnlionEwhsBCJ8yek4aib575BI3OkART/90WsgHgLWw==", "dev": true }, "node_modules/@tsconfig/node12": { @@ -1785,15 +1785,16 @@ } }, "node_modules/array-includes": { - "version": "3.1.7", - "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.7.tgz", - "integrity": "sha512-dlcsNBIiWhPkHdOEEKnehA+RNUWDc4UqFtnIXU4uuYDPtA4LDkr7qip2p0VvFAEXNDr0yWZ9PJyIRiGjRLQzwQ==", + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.8.tgz", + "integrity": "sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "get-intrinsic": "^1.2.1", + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-object-atoms": "^1.0.0", + "get-intrinsic": "^1.2.4", "is-string": "^1.0.7" }, "engines": { @@ -1813,15 +1814,16 @@ } }, "node_modules/array.prototype.findlastindex": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.4.tgz", - "integrity": "sha512-hzvSHUshSpCflDR1QMUBLHGHP1VIEBegT4pix9H/Z92Xw3ySoy6c2qh7lJWTJnRJ8JCZ9bJNCgTyYaJGcJu6xQ==", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.5.tgz", + "integrity": "sha512-zfETvRFA8o7EiNn++N5f/kaCw221hrpGsDmcpndVupkPzEc1Wuf3VgC0qby1BbHs7f5DVYjgtEU2LLh5bqeGfQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.5", + "call-bind": "^1.0.7", "define-properties": "^1.2.1", - "es-abstract": "^1.22.3", + "es-abstract": "^1.23.2", "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", "es-shim-unscopables": "^1.0.2" }, "engines": { @@ -2010,9 +2012,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001599", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001599.tgz", - "integrity": "sha512-LRAQHZ4yT1+f9LemSMeqdMpMxZcc4RMWdj4tiFe3G8tNkWK+E58g+/tzotb5cU6TbcVJLr4fySiAW7XmxQvZQA==", + "version": "1.0.30001600", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001600.tgz", + "integrity": "sha512-+2S9/2JFhYmYaDpZvo0lKkfvuKIglrx68MwOBqMGHhQsNkLjB5xtc/TGoEPs+MxjSyN/72qer2g97nzR641mOQ==", "dev": true, "funding": [ { @@ -2300,9 +2302,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.4.710", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.710.tgz", - "integrity": "sha512-w+9yAVHoHhysCa+gln7AzbO9CdjFcL/wN/5dd+XW/Msl2d/4+WisEaCF1nty0xbAKaxdaJfgLB2296U7zZB7BA==", + "version": "1.4.715", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.715.tgz", + "integrity": "sha512-XzWNH4ZSa9BwVUQSDorPWAUQ5WGuYz7zJUNpNif40zFCiCl20t8zgylmreNmn26h5kiyw2lg7RfTmeMBsDklqg==", "dev": true }, "node_modules/enhanced-resolve": { @@ -2452,9 +2454,9 @@ } }, "node_modules/esbuild": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.12.tgz", - "integrity": "sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.20.2.tgz", + "integrity": "sha512-WdOOppmUNU+IbZ0PaDiTst80zjnrOkyJNHoKupIcVyU8Lvla3Ugx94VzkQ32Ijqd7UhHJy75gNWDMUekcrSJ6g==", "dev": true, "hasInstallScript": true, "bin": { @@ -2464,29 +2466,29 @@ "node": ">=12" }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.19.12", - "@esbuild/android-arm": "0.19.12", - "@esbuild/android-arm64": "0.19.12", - "@esbuild/android-x64": "0.19.12", - "@esbuild/darwin-arm64": "0.19.12", - "@esbuild/darwin-x64": "0.19.12", - "@esbuild/freebsd-arm64": "0.19.12", - "@esbuild/freebsd-x64": "0.19.12", - "@esbuild/linux-arm": "0.19.12", - "@esbuild/linux-arm64": "0.19.12", - "@esbuild/linux-ia32": "0.19.12", - "@esbuild/linux-loong64": "0.19.12", - "@esbuild/linux-mips64el": "0.19.12", - "@esbuild/linux-ppc64": "0.19.12", - "@esbuild/linux-riscv64": "0.19.12", - "@esbuild/linux-s390x": "0.19.12", - "@esbuild/linux-x64": "0.19.12", - "@esbuild/netbsd-x64": "0.19.12", - "@esbuild/openbsd-x64": "0.19.12", - "@esbuild/sunos-x64": "0.19.12", - "@esbuild/win32-arm64": "0.19.12", - "@esbuild/win32-ia32": "0.19.12", - "@esbuild/win32-x64": "0.19.12" + "@esbuild/aix-ppc64": "0.20.2", + "@esbuild/android-arm": "0.20.2", + "@esbuild/android-arm64": "0.20.2", + "@esbuild/android-x64": "0.20.2", + "@esbuild/darwin-arm64": "0.20.2", + "@esbuild/darwin-x64": "0.20.2", + "@esbuild/freebsd-arm64": "0.20.2", + "@esbuild/freebsd-x64": "0.20.2", + "@esbuild/linux-arm": "0.20.2", + "@esbuild/linux-arm64": "0.20.2", + "@esbuild/linux-ia32": "0.20.2", + "@esbuild/linux-loong64": "0.20.2", + "@esbuild/linux-mips64el": "0.20.2", + "@esbuild/linux-ppc64": "0.20.2", + "@esbuild/linux-riscv64": "0.20.2", + "@esbuild/linux-s390x": "0.20.2", + "@esbuild/linux-x64": "0.20.2", + "@esbuild/netbsd-x64": "0.20.2", + "@esbuild/openbsd-x64": "0.20.2", + "@esbuild/sunos-x64": "0.20.2", + "@esbuild/win32-arm64": "0.20.2", + "@esbuild/win32-ia32": "0.20.2", + "@esbuild/win32-x64": "0.20.2" } }, "node_modules/escalade": { @@ -4511,9 +4513,9 @@ } }, "node_modules/postcss": { - "version": "8.4.36", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.36.tgz", - "integrity": "sha512-/n7eumA6ZjFHAsbX30yhHup/IMkOmlmvtEi7P+6RMYf+bGJSUHc3geH4a0NSZxAz/RJfiS9tooCTs9LAVYUZKw==", + "version": "8.4.38", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.38.tgz", + "integrity": "sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==", "dev": true, "funding": [ { @@ -4532,7 +4534,7 @@ "dependencies": { "nanoid": "^3.3.7", "picocolors": "^1.0.0", - "source-map-js": "^1.1.0" + "source-map-js": "^1.2.0" }, "engines": { "node": "^10 || ^12 || >=14" @@ -4965,9 +4967,9 @@ } }, "node_modules/source-map-js": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.1.0.tgz", - "integrity": "sha512-9vC2SfsJzlej6MAaMPLu8HiBSHGdRAJ9hVFYN1ibZoNkeanmDmLUcIrj6G9DGL7XMJ54AKg/G75akXl1/izTOw==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", + "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", "dev": true, "engines": { "node": ">=0.10.0" @@ -5018,14 +5020,17 @@ } }, "node_modules/string.prototype.trimstart": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.7.tgz", - "integrity": "sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz", + "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -5411,9 +5416,9 @@ } }, "node_modules/typed-array-length": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.5.tgz", - "integrity": "sha512-yMi0PlwuznKHxKmcpoOdeLwxBoVPkqZxd7q2FgMkmD3bNwvF5VW0+UlUQ1k1vmktTu4Yu13Q0RIxEP8+B+wloA==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.6.tgz", + "integrity": "sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==", "dev": true, "dependencies": { "call-bind": "^1.0.7", @@ -5431,9 +5436,9 @@ } }, "node_modules/typescript": { - "version": "5.4.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.2.tgz", - "integrity": "sha512-+2/g0Fds1ERlP6JsakQQDXjZdZMM+rqpamFZJEKh4kwTIn3iDkgKtby0CeNd5ATNZ4Ry1ax15TMx0W2V+miizQ==", + "version": "5.4.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.3.tgz", + "integrity": "sha512-KrPd3PKaCLr78MalgiwJnA25Nm8HAmdwN3mYUYZgG/wizIo9EainNVQI9/yDavtVFRN2h3k8uf3GLHuhDMgEHg==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -5444,9 +5449,9 @@ } }, "node_modules/ufo": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.5.2.tgz", - "integrity": "sha512-eiutMaL0J2MKdhcOM1tUy13pIrYnyR87fEd8STJQFrrAwImwvlXkxlZEjaKah8r2viPohld08lt73QfLG1NxMg==", + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.5.3.tgz", + "integrity": "sha512-Y7HYmWaFwPUmkoQCUIAYpKqkOf+SbVj/2fJJZ4RJMCfZp0rTGwRbzQD+HghfnhKOjL9E01okqz+ncJskGYfBNw==", "dev": true }, "node_modules/unbox-primitive": { @@ -5465,9 +5470,9 @@ } }, "node_modules/undici": { - "version": "6.9.0", - "resolved": "https://registry.npmjs.org/undici/-/undici-6.9.0.tgz", - "integrity": "sha512-XPWfXzJedevUziHwun70EKNvGnxv4CnfraFZ4f/JV01+fcvMYzHE26r/j8AY/9c/70nkN4B1zX7E2Oyuqwz4+Q==", + "version": "6.10.1", + "resolved": "https://registry.npmjs.org/undici/-/undici-6.10.1.tgz", + "integrity": "sha512-kSzmWrOx3XBKTgPm4Tal8Hyl3yf+hzlA00SAf4goxv8LZYafKmS6gJD/7Fe5HH/DMNiFTRXvkwhLo7mUn5fuQQ==", "dev": true, "engines": { "node": ">=18.0" @@ -5525,14 +5530,14 @@ "dev": true }, "node_modules/vite": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.1.6.tgz", - "integrity": "sha512-yYIAZs9nVfRJ/AiOLCA91zzhjsHUgMjB+EigzFb6W2XTLO8JixBCKCjvhKZaye+NKYHCrkv3Oh50dH9EdLU2RA==", + "version": "5.2.6", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.2.6.tgz", + "integrity": "sha512-FPtnxFlSIKYjZ2eosBQamz4CbyrTizbZ3hnGJlh/wMtCrlp1Hah6AzBLjGI5I2urTfNnpovpHdrL6YRuBOPnCA==", "dev": true, "dependencies": { - "esbuild": "^0.19.3", - "postcss": "^8.4.35", - "rollup": "^4.2.0" + "esbuild": "^0.20.1", + "postcss": "^8.4.36", + "rollup": "^4.13.0" }, "bin": { "vite": "bin/vite.js" diff --git a/package.json b/package.json index 72ae09f3..eb64b600 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@lokalise/node-api", - "version": "12.3.0", + "version": "12.4.0", "description": "Official Lokalise API 2.0 Node.js client", "license": "BSD-3-Clause", "repository": { diff --git a/src/collections/base_collection.ts b/src/collections/base_collection.ts index d391e7d3..03c441f0 100644 --- a/src/collections/base_collection.ts +++ b/src/collections/base_collection.ts @@ -1,4 +1,4 @@ -import { HttpMethod } from "../types/http_method.js"; +import type { HttpMethod } from "../types/http_method.js"; import { ApiRequest } from "../http_client/base.js"; import { ApiError } from "../models/api_error.js"; import { PaginatedResult } from "../models/paginated_result.js"; diff --git a/src/collections/branches.ts b/src/collections/branches.ts index 9ed737e2..8ef59b4f 100644 --- a/src/collections/branches.ts +++ b/src/collections/branches.ts @@ -1,22 +1,16 @@ import { BaseCollection } from "./base_collection.js"; import { Branch } from "../models/branch.js"; import { PaginatedResult } from "../interfaces/paginated_result.js"; -import { ProjectWithPagination } from "../interfaces/project_with_pagination.js"; -import { ProjectOnly } from "../interfaces/project_only.js"; -import { BranchParams } from "../types/branch_params.js"; -import { MergeBranchParams } from "../types/merge_branch_params.js"; - -type BranchDeleted = { - project_id: string; - branch_deleted: boolean; -}; - -type BranchMerged = { - project_id: string; - branch_merged: boolean; - branch: Branch; - target_branch: Branch; -}; +import type { + ProjectWithPagination, + ProjectOnly, +} from "../types/common_get_params.js"; +import type { + BranchParams, + MergeBranchParams, + BranchDeleted, + BranchMerged, +} from "../types/branches.js"; export class Branches extends BaseCollection { protected static rootElementName = "branches"; diff --git a/src/collections/comments.ts b/src/collections/comments.ts index cd5ab270..cd3299f4 100644 --- a/src/collections/comments.ts +++ b/src/collections/comments.ts @@ -1,26 +1,13 @@ import { BaseCollection } from "./base_collection.js"; import { Comment } from "../models/comment.js"; import { PaginatedResult } from "../interfaces/paginated_result.js"; -import { ProjectWithPagination } from "../interfaces/project_with_pagination.js"; -import { ProjectOnly } from "../interfaces/project_only.js"; - -interface ParamsWithPagination extends ProjectWithPagination { - key_id: number | string; -} - -interface ProjectAndKey extends ProjectOnly { - key_id: number | string; -} - -type CommentData = { - comment: string; -}; - -type CommentDeleted = { - project_id: string; - comment_deleted: boolean; - branch?: string; -}; +import type { ProjectWithPagination } from "../types/common_get_params.js"; +import type { + CommentData, + CommentDeleted, + KeyProjectPagination, + ProjectAndKey, +} from "../types/comments.js"; export class Comments extends BaseCollection { protected static rootElementName = "comments"; @@ -30,7 +17,7 @@ export class Comments extends BaseCollection { protected static elementClass = Comment; list( - request_params: ParamsWithPagination, + request_params: KeyProjectPagination, ): Promise> { return this.doList(request_params); } diff --git a/src/collections/contributors.ts b/src/collections/contributors.ts index 29c99bdf..2c0e0974 100644 --- a/src/collections/contributors.ts +++ b/src/collections/contributors.ts @@ -1,16 +1,15 @@ import { BaseCollection } from "./base_collection.js"; import { Contributor } from "../models/contributor.js"; -import { ProjectWithPagination } from "../interfaces/project_with_pagination.js"; import { PaginatedResult } from "../interfaces/paginated_result.js"; -import { ProjectOnly } from "../interfaces/project_only.js"; -import { ContributorCreateData } from "../types/contributor_create_data.js"; -import { ContributorUpdateData } from "../types/contributor_update_data.js"; - -type ContributorDeleted = { - project_id: string; - contributor_deleted: boolean; - branch?: string; -}; +import type { + ProjectWithPagination, + ProjectOnly, +} from "../types/common_get_params.js"; +import type { + ContributorCreateData, + ContributorUpdateData, + ContributorDeleted, +} from "../types/contributors.js"; export class Contributors extends BaseCollection { protected static rootElementName = "contributors"; diff --git a/src/collections/files.ts b/src/collections/files.ts index 900cb5bc..c03e74cc 100644 --- a/src/collections/files.ts +++ b/src/collections/files.ts @@ -1,21 +1,15 @@ import { BaseCollection } from "./base_collection.js"; import { File } from "../models/file.js"; import { QueuedProcess } from "../models/queued_process.js"; -import { UploadFileParams } from "../interfaces/upload_file_params.js"; -import { DownloadFileParams } from "../interfaces/download_file_params.js"; -import { ProjectWithPagination } from "../interfaces/project_with_pagination.js"; import { PaginatedResult } from "../interfaces/paginated_result.js"; -import { ProjectOnly } from "../interfaces/project_only.js"; -import { DownloadBundle } from "../types/download_bundle.js"; - -interface ListFileParams extends ProjectWithPagination { - filter_filename?: string; -} - -type FileDeleted = { - project_id: string; - file_deleted: boolean; -}; +import type { ProjectOnly } from "../types/common_get_params.js"; +import type { + DownloadBundle, + FileDeleted, + DownloadFileParams, + UploadFileParams, + ListFileParams, +} from "../types/files.js"; export class Files extends BaseCollection { protected static rootElementName = "files"; diff --git a/src/collections/keys.ts b/src/collections/keys.ts index d72718b4..98f08527 100644 --- a/src/collections/keys.ts +++ b/src/collections/keys.ts @@ -1,27 +1,17 @@ import { BaseCollection } from "./base_collection.js"; import { Key } from "../models/key.js"; -import { KeyParamsWithPagination } from "../interfaces/key_params_with_pagination.js"; import { PaginatedResult } from "../interfaces/paginated_result.js"; -import { ProjectOnly } from "../interfaces/project_only.js"; -import { CreateKeyParams } from "../types/create_key_params.js"; -import { UpdateKeyData } from "../types/update_key_data.js"; -import { BulkUpdateKeyParams } from "../types/bulk_update_key_params.js"; import { BulkResult } from "../interfaces/bulk_result.js"; -import { GetKeyParams } from "../interfaces/get_key_params.js"; - -type KeyDeleted = { - project_id: string; - key_removed: boolean; - keys_locked?: number; - branch?: string; -}; - -type KeysBulkDeleted = { - project_id: string; - keys_removed: boolean; - keys_locked: number; - branch?: string; -}; +import type { ProjectOnly } from "../types/common_get_params.js"; +import type { + CreateKeyParams, + UpdateKeyData, + BulkUpdateKeyParams, + KeyDeleted, + KeysBulkDeleted, + KeyParamsWithPagination, + GetKeyParams, +} from "../types/keys.js"; export class Keys extends BaseCollection { protected static rootElementName = "keys"; diff --git a/src/collections/languages.ts b/src/collections/languages.ts index 96798727..9793cb3f 100644 --- a/src/collections/languages.ts +++ b/src/collections/languages.ts @@ -1,18 +1,17 @@ import { Language } from "../models/language.js"; import { BaseCollection } from "./base_collection.js"; import { PaginatedResult } from "../interfaces/paginated_result.js"; -import { ProjectWithPagination } from "../interfaces/project_with_pagination.js"; -import { ProjectOnly } from "../interfaces/project_only.js"; import { BulkResult } from "../interfaces/bulk_result.js"; -import { PaginationParams } from "../interfaces/pagination_params.js"; -import { CreateLanguageParams } from "../types/create_language_params.js"; -import { UpdateLanguageParams } from "../types/update_language_params.js"; - -type LanguageDeleted = { - project_id: string; - language_deleted: boolean; - branch?: string; -}; +import type { + ProjectWithPagination, + ProjectOnly, + PaginationParams, +} from "../types/common_get_params.js"; +import type { + CreateLanguageParams, + UpdateLanguageParams, + LanguageDeleted, +} from "../types/languages.js"; export class Languages extends BaseCollection { protected static rootElementName = "languages"; diff --git a/src/collections/orders.ts b/src/collections/orders.ts index beef3f4f..1b56deff 100644 --- a/src/collections/orders.ts +++ b/src/collections/orders.ts @@ -1,9 +1,9 @@ import { Order } from "../models/order.js"; import { BaseCollection } from "./base_collection.js"; -import { TeamWithPagination } from "../interfaces/team_with_pagination.js"; -import { TeamOnly } from "../interfaces/team_only.js"; import { PaginatedResult } from "../interfaces/paginated_result.js"; -import { CreateOrderParams } from "../types/create_order_params.js"; +import type { TeamWithPagination } from "../types/teams.js"; +import type { TeamOnly } from "../types/common_get_params.js"; +import type { CreateOrderParams } from "../types/orders.js"; export class Orders extends BaseCollection { protected static rootElementName = "orders"; diff --git a/src/collections/payment_cards.ts b/src/collections/payment_cards.ts index fb297304..3fb76492 100644 --- a/src/collections/payment_cards.ts +++ b/src/collections/payment_cards.ts @@ -1,13 +1,8 @@ import { PaymentCard } from "../models/payment_card.js"; import { BaseCollection } from "./base_collection.js"; -import { PaginationParams } from "../interfaces/pagination_params.js"; import { PaginatedResult } from "../interfaces/paginated_result.js"; -import { CreateCardParams } from "../types/create_card_params.js"; - -type CardDeleted = { - card_id: string; - card_deleted: boolean; -}; +import type { PaginationParams } from "../types/common_get_params.js"; +import type { CreateCardParams, CardDeleted } from "../types/cards.js"; export class PaymentCards extends BaseCollection { protected static rootElementName = "payment_cards"; diff --git a/src/collections/projects.ts b/src/collections/projects.ts index f9bec116..acf1e2e6 100644 --- a/src/collections/projects.ts +++ b/src/collections/projects.ts @@ -1,26 +1,13 @@ import { Project } from "../models/project.js"; import { BaseCollection } from "./base_collection.js"; -import { PaginationParams } from "../interfaces/pagination_params.js"; import { PaginatedResult } from "../interfaces/paginated_result.js"; -import { CreateProjectParams } from "../types/create_project_params.js"; -import { UpdateProjectParams } from "../types/update_project_params.js"; - -interface ProjectListParams extends PaginationParams { - filter_team_id?: number | string; - filter_names?: string; - include_statistics?: string | number; - include_settings?: string | number; -} - -type ProjectDeleted = { - project_id: string; - project_deleted: boolean; -}; - -type ProjectEmptied = { - project_id: string; - keys_deleted: boolean; -}; +import type { + CreateProjectParams, + UpdateProjectParams, + ProjectDeleted, + ProjectEmptied, + ProjectListParams, +} from "../types/projects.js"; export class Projects extends BaseCollection { protected static rootElementName = "projects"; diff --git a/src/collections/queued_processes.ts b/src/collections/queued_processes.ts index 3ececc44..4c776384 100644 --- a/src/collections/queued_processes.ts +++ b/src/collections/queued_processes.ts @@ -1,8 +1,10 @@ import { QueuedProcess } from "../models/queued_process.js"; import { BaseCollection } from "./base_collection.js"; -import { ProjectWithPagination } from "../interfaces/project_with_pagination.js"; import { PaginatedResult } from "../interfaces/paginated_result.js"; -import { ProjectOnly } from "../interfaces/project_only.js"; +import type { + ProjectWithPagination, + ProjectOnly, +} from "../types/common_get_params.js"; export class QueuedProcesses extends BaseCollection { protected static rootElementName = "processes"; diff --git a/src/collections/screenshots.ts b/src/collections/screenshots.ts index 8aab64d8..f5e6a2d2 100644 --- a/src/collections/screenshots.ts +++ b/src/collections/screenshots.ts @@ -1,17 +1,16 @@ import { BaseCollection } from "./base_collection.js"; import { Screenshot } from "../models/screenshot.js"; import { PaginatedResult } from "../interfaces/paginated_result.js"; -import { ProjectWithPagination } from "../interfaces/project_with_pagination.js"; -import { ProjectOnly } from "../interfaces/project_only.js"; import { BulkResult } from "../interfaces/bulk_result.js"; -import { CreateScreenshotParams } from "../types/create_screenshot_params.js"; -import { UpdateScreenshotParams } from "../types/update_screenshot_params.js"; - -type ScreenshotDeleted = { - project_id: string; - screenshot_deleted: boolean; - branch?: string; -}; +import type { + ProjectWithPagination, + ProjectOnly, +} from "../types/common_get_params.js"; +import type { + CreateScreenshotParams, + UpdateScreenshotParams, + ScreenshotDeleted, +} from "../types/screenshots.js"; export class Screenshots extends BaseCollection { protected static rootElementName = "screenshots"; diff --git a/src/collections/segments.ts b/src/collections/segments.ts index a01c4fcd..e71e4342 100644 --- a/src/collections/segments.ts +++ b/src/collections/segments.ts @@ -1,28 +1,11 @@ import { Segment } from "../models/segment.js"; import { BaseCollection } from "./base_collection.js"; -import { ProjectOnly } from "../interfaces/project_only.js"; - -interface GetSegmentParams extends ProjectOnly { - key_id: number | string; - language_iso: string; - disable_references?: number | string; -} - -type UpdateSegmentReqParams = Omit; - -type UpdateSegmentBodyParams = { - value: string; - is_fuzzy?: boolean; - is_reviewed?: boolean; - custom_translation_status_ids?: string[] | number[]; -}; - -interface ListSegmentParams extends GetSegmentParams { - filter_is_reviewed?: number | string; - filter_unverified?: number | string; - filter_untranslated?: number | string; - filter_qa_issues?: string; -} +import type { + GetSegmentParams, + UpdateSegmentReqParams, + UpdateSegmentBodyParams, + ListSegmentParams, +} from "../types/segments.js"; export class Segments extends BaseCollection { protected static rootElementName = "segments"; diff --git a/src/collections/snapshots.ts b/src/collections/snapshots.ts index c962ce34..daf8d8eb 100644 --- a/src/collections/snapshots.ts +++ b/src/collections/snapshots.ts @@ -1,16 +1,15 @@ import { BaseCollection } from "./base_collection.js"; import { Snapshot } from "../models/snapshot.js"; import { PaginatedResult } from "../interfaces/paginated_result.js"; -import { ProjectWithPagination } from "../interfaces/project_with_pagination.js"; -import { ProjectOnly } from "../interfaces/project_only.js"; import { Project } from "../models/project.js"; -import { CreateSnapshotParams } from "../types/create_snapshot_params.js"; - -type SnapshotDeleted = { - project_id: string; - snapshot_deleted: boolean; - branch?: string; -}; +import type { + ProjectOnly, + ProjectWithPagination, +} from "../types/common_get_params.js"; +import type { + CreateSnapshotParams, + SnapshotDeleted, +} from "../types/snapshots.js"; export class Snapshots extends BaseCollection { protected static rootElementName = "snapshots"; diff --git a/src/collections/tasks.ts b/src/collections/tasks.ts index a65a3702..63482860 100644 --- a/src/collections/tasks.ts +++ b/src/collections/tasks.ts @@ -1,21 +1,13 @@ import { BaseCollection } from "./base_collection.js"; import { Task } from "../models/task.js"; import { PaginatedResult } from "../interfaces/paginated_result.js"; -import { ProjectWithPagination } from "../interfaces/project_with_pagination.js"; -import { ProjectOnly } from "../interfaces/project_only.js"; -import { CreateTaskParams } from "../types/create_task_params.js"; -import { UpdateTaskParams } from "../types/update_task_params.js"; - -interface ListTaskParams extends ProjectWithPagination { - filter_title?: string; - filter_statuses?: string; -} - -type TaskDeleted = { - project_id: string; - task_deleted: boolean; - branch?: string; -}; +import type { ProjectOnly } from "../types/common_get_params.js"; +import type { + CreateTaskParams, + UpdateTaskParams, + TaskDeleted, + ListTaskParams, +} from "../types/tasks.js"; export class Tasks extends BaseCollection { protected static rootElementName = "tasks"; diff --git a/src/collections/team_user_billing_details.ts b/src/collections/team_user_billing_details.ts index 1eea016b..a4a56438 100644 --- a/src/collections/team_user_billing_details.ts +++ b/src/collections/team_user_billing_details.ts @@ -1,7 +1,7 @@ import { TeamUserBillingDetails as BillingDetailsModel } from "../models/team_user_billing_details.js"; import { BaseCollection } from "./base_collection.js"; -import { TeamOnly } from "../interfaces/team_only.js"; -import { BillingDetailsParams } from "../types/billing_details_params.js"; +import type { TeamOnly } from "../types/common_get_params.js"; +import type { BillingDetailsParams } from "../types/billing_details.js"; export class TeamUserBillingDetails extends BaseCollection { protected static rootElementName = ""; diff --git a/src/collections/team_users.ts b/src/collections/team_users.ts index 5120c194..078bc795 100644 --- a/src/collections/team_users.ts +++ b/src/collections/team_users.ts @@ -1,14 +1,9 @@ import { BaseCollection } from "./base_collection.js"; import { TeamUser } from "../models/team_user.js"; -import { TeamWithPagination } from "../interfaces/team_with_pagination.js"; import { PaginatedResult } from "../interfaces/paginated_result.js"; -import { TeamOnly } from "../interfaces/team_only.js"; -import { TeamUserParams } from "../types/team_user_params.js"; - -type TeamUserDeleted = { - team_id: string; - team_user_deleted: boolean; -}; +import type { TeamWithPagination } from "../types/teams.js"; +import type { TeamOnly } from "../types/common_get_params.js"; +import type { TeamUserParams, TeamUserDeleted } from "../types/team_users.js"; export class TeamUsers extends BaseCollection { protected static rootElementName = "team_users"; diff --git a/src/collections/teams.ts b/src/collections/teams.ts index 364a4b2b..b06224f4 100644 --- a/src/collections/teams.ts +++ b/src/collections/teams.ts @@ -1,7 +1,7 @@ import { BaseCollection } from "./base_collection.js"; import { Team } from "../models/team.js"; -import { PaginationParams } from "../interfaces/pagination_params.js"; import { PaginatedResult } from "../interfaces/paginated_result.js"; +import type { PaginationParams } from "../types/common_get_params.js"; export class Teams extends BaseCollection { protected static rootElementName = "teams"; diff --git a/src/collections/translation_providers.ts b/src/collections/translation_providers.ts index 4c8ef1fb..82fd6716 100644 --- a/src/collections/translation_providers.ts +++ b/src/collections/translation_providers.ts @@ -1,8 +1,8 @@ import { BaseCollection } from "./base_collection.js"; import { TranslationProvider } from "../models/translation_provider.js"; -import { TeamWithPagination } from "../interfaces/team_with_pagination.js"; import { PaginatedResult } from "../interfaces/paginated_result.js"; -import { TeamOnly } from "../interfaces/team_only.js"; +import type { TeamOnly } from "../types/common_get_params.js"; +import type { TeamWithPagination } from "../types/teams.js"; export class TranslationProviders extends BaseCollection { protected static rootElementName = "translation_providers"; diff --git a/src/collections/translation_statuses.ts b/src/collections/translation_statuses.ts index cd834f0d..800ef572 100644 --- a/src/collections/translation_statuses.ts +++ b/src/collections/translation_statuses.ts @@ -1,20 +1,16 @@ import { BaseCollection } from "./base_collection.js"; import { TranslationStatus } from "../models/translation_status.js"; import { PaginatedResult } from "../interfaces/paginated_result.js"; -import { ProjectWithPagination } from "../interfaces/project_with_pagination.js"; -import { ProjectOnly } from "../interfaces/project_only.js"; -import { CreateTranslationStatusParams } from "../types/create_translation_status_params.js"; -import { UpdateTranslationStatusParams } from "../types/update_translation_status_params.js"; - -type TranslationStatusDeleted = { - project_id: string; - custom_translation_status_deleted: boolean; - branch?: string; -}; - -type TranslationStatusColors = { - colors: string[]; -}; +import type { + ProjectOnly, + ProjectWithPagination, +} from "../types/common_get_params.js"; +import type { + CreateTranslationStatusParams, + UpdateTranslationStatusParams, + TranslationStatusDeleted, + TranslationStatusColors, +} from "../types/translation_statuses.js"; export class TranslationStatuses extends BaseCollection { protected static rootElementName = "custom_translation_statuses"; diff --git a/src/collections/translations.ts b/src/collections/translations.ts index 284ef892..4313d45e 100644 --- a/src/collections/translations.ts +++ b/src/collections/translations.ts @@ -1,23 +1,12 @@ import { BaseCollection } from "./base_collection.js"; import { Translation } from "../models/translation.js"; import { PaginatedResult } from "../interfaces/paginated_result.js"; -import { ProjectWithPagination } from "../interfaces/project_with_pagination.js"; -import { ProjectOnly } from "../interfaces/project_only.js"; -import { UpdateTranslationParams } from "../types/update_translation_params.js"; - -interface ListTranslationParams extends ProjectWithPagination { - disable_references?: number | string; - filter_lang_id?: number | string; - filter_is_reviewed?: number | string; - filter_unverified?: number | string; - filter_untranslated?: number | string; - filter_qa_issues?: string; - filter_active_task_id?: number | string; -} - -interface GetTranslationParams extends ProjectOnly { - disable_references?: number | string; -} +import type { ProjectOnly } from "../types/common_get_params.js"; +import type { + UpdateTranslationParams, + ListTranslationParams, + GetTranslationParams, +} from "../types/translations.js"; export class Translations extends BaseCollection { protected static rootElementName = "translations"; diff --git a/src/collections/user_groups.ts b/src/collections/user_groups.ts index 821fbbdf..4d272af1 100644 --- a/src/collections/user_groups.ts +++ b/src/collections/user_groups.ts @@ -1,15 +1,13 @@ import { BaseCollection } from "./base_collection.js"; import { UserGroup } from "../models/user_group.js"; import { Keyable } from "../interfaces/keyable.js"; -import { TeamWithPagination } from "../interfaces/team_with_pagination.js"; import { PaginatedResult } from "../interfaces/paginated_result.js"; -import { TeamOnly } from "../interfaces/team_only.js"; -import { UserGroupParams } from "../types/user_group_params.js"; - -type UserGroupDeleted = { - team_id: string; - group_deleted: boolean; -}; +import type { TeamWithPagination } from "../types/teams.js"; +import type { TeamOnly } from "../types/common_get_params.js"; +import type { + UserGroupParams, + UserGroupDeleted, +} from "../types/user_groups.js"; export class UserGroups extends BaseCollection { protected static rootElementName = "user_groups"; diff --git a/src/collections/webhooks.ts b/src/collections/webhooks.ts index a2b23531..a941c358 100644 --- a/src/collections/webhooks.ts +++ b/src/collections/webhooks.ts @@ -1,20 +1,16 @@ import { BaseCollection } from "./base_collection.js"; import { Webhook } from "../models/webhook.js"; import { PaginatedResult } from "../interfaces/paginated_result.js"; -import { ProjectWithPagination } from "../interfaces/project_with_pagination.js"; -import { ProjectOnly } from "../interfaces/project_only.js"; -import { CreateWebhookParams } from "../types/create_webhook_params.js"; -import { UpdateWebhookParams } from "../types/update_webhook_params.js"; - -type WebhookDeleted = { - project_id: string; - webhook_deleted: boolean; -}; - -type WebhookRegenerated = { - project_id: string; - secret: string; -}; +import type { + ProjectWithPagination, + ProjectOnly, +} from "../types/common_get_params.js"; +import type { + CreateWebhookParams, + UpdateWebhookParams, + WebhookDeleted, + WebhookRegenerated, +} from "../types/webhooks.js"; export class Webhooks extends BaseCollection { protected static rootElementName = "webhooks"; diff --git a/src/http_client/base.ts b/src/http_client/base.ts index 3a4d07d6..8a7390f4 100644 --- a/src/http_client/base.ts +++ b/src/http_client/base.ts @@ -1,4 +1,4 @@ -import { HttpMethod } from "../types/http_method.js"; +import type { HttpMethod } from "../types/http_method.js"; import { Keyable, WritableKeyable } from "../interfaces/keyable.js"; import { ClientData } from "../interfaces/client_data.js"; import { LokalisePkg } from "../lokalise/pkg.js"; diff --git a/src/interfaces/create_project_key_input.ts b/src/interfaces/create_project_key_input.ts deleted file mode 100644 index 68a01677..00000000 --- a/src/interfaces/create_project_key_input.ts +++ /dev/null @@ -1,24 +0,0 @@ -import type { SupportedPlatforms } from "../types/supported_platforms.js"; - -export type CreateProjectKeyInput = { - key_name: string; - description?: string; - platforms: Array; - filenames?: { - [key: string]: string; - }; - tags?: Array; - translations?: Array<{ - language_iso: string; - translation: string; - is_reviewed?: boolean; - is_unverified?: boolean; - custom_translation_status_ids?: Array; - }>; - is_plural?: boolean; - plural_name?: string; - is_hidden?: boolean; - is_archived?: boolean; - context?: string; - char_limit?: number; -}; diff --git a/src/interfaces/get_key_params.ts b/src/interfaces/get_key_params.ts deleted file mode 100644 index 79a45bfd..00000000 --- a/src/interfaces/get_key_params.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { ProjectOnly } from "./project_only.js"; -import type { NumericBool } from "../types/numeric_bool.js"; - -export interface GetKeyParams extends ProjectOnly { - disable_references?: NumericBool; -} diff --git a/src/interfaces/index.ts b/src/interfaces/index.ts index 22a3b9e3..d6735950 100644 --- a/src/interfaces/index.ts +++ b/src/interfaces/index.ts @@ -6,33 +6,16 @@ export { BulkResult } from "./bulk_result.js"; export { ClientData } from "./client_data.js"; export { Comment } from "./comment.js"; export { Contributor } from "./contributor.js"; -export { CreateProjectKeyInput } from "./create_project_key_input.js"; -export { DownloadFileParams } from "./download_file_params.js"; export { File } from "./file.js"; export { Jwt } from "./jwt.js"; -export { GetKeyParams } from "./get_key_params.js"; -export { KeyParamsWithPagination } from "./key_params_with_pagination.js"; export { Key } from "./key.js"; -export { LanguageMapping } from "./language_mapping.js"; export { Language } from "./language.js"; export { Order } from "./order.js"; export { PaginatedResult } from "./paginated_result.js"; -export { PaginationParams } from "./pagination_params.js"; export { PaymentCard } from "./payment_card.js"; -export { ProjectOnly } from "./project_only.js"; export { ProjectSettings } from "./project_settings.js"; export { ProjectStatistics } from "./project_statistics.js"; -export { ProjectWithPagination } from "./project_with_pagination.js"; export { Project } from "./project.js"; -export { OtaSdkToken } from "./ota_sdk_token.js"; -export { OtaApiError } from "./ota_api_error.js"; -export { OtaBundleArchive } from "./ota_bundle_archive.js"; -export { OtaBundle } from "./ota_bundle.js"; -export { OtaFramework } from "./ota_framework.js"; -export { OtaFreezePeriod } from "./ota_freeze_period.js"; -export { OtaStatistics } from "./ota_statistics.js"; -export { OtaTeamProjectFramework } from "./ota_team_project_framework.js"; -export { OtaTeamProject } from "./ota_team_project.js"; export { QueuedProcess } from "./queued_process.js"; export { RefreshTokenResponse } from "./refresh_token_response.js"; export { RequestTokenResponse } from "./request_token_response.js"; @@ -40,14 +23,18 @@ export { Screenshot } from "./screenshot.js"; export { Segment } from "./segment.js"; export { Snapshot } from "./snapshot.js"; export { Task } from "./task.js"; -export { TeamOnly } from "./team_only.js"; export { TeamUserBillingDetails } from "./team_user_billing_details.js"; export { TeamUser } from "./team_user.js"; -export { TeamWithPagination } from "./team_with_pagination.js"; export { Team } from "./team.js"; export { TranslationProvider } from "./translation_provider.js"; export { TranslationStatus } from "./translation_status.js"; export { Translation } from "./translation.js"; -export { UploadFileParams } from "./upload_file_params.js"; export { UserGroup } from "./user_group.js"; export { Webhook } from "./webhook.js"; + +export { OtaSdkToken } from "./ota/ota_sdk_token.js"; +export { OtaApiError } from "./ota/ota_api_error.js"; +export { OtaBundleArchive } from "./ota/ota_bundle_archive.js"; +export { OtaBundle } from "./ota/ota_bundle.js"; +export { OtaFreezePeriod } from "./ota/ota_freeze_period.js"; +export { OtaStatistics } from "./ota/ota_statistics.js"; diff --git a/src/interfaces/key_params_with_pagination.ts b/src/interfaces/key_params_with_pagination.ts deleted file mode 100644 index 2215771b..00000000 --- a/src/interfaces/key_params_with_pagination.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { ProjectWithPagination } from "./project_with_pagination.js"; -import type { NumericBool } from "../types/numeric_bool.js"; - -export interface KeyParamsWithPagination extends ProjectWithPagination { - disable_references?: NumericBool; - include_comments?: NumericBool; - include_screenshots?: NumericBool; - include_translations?: NumericBool; - filter_translation_lang_ids?: string; - filter_tags?: string; - filter_filenames?: string; - filter_keys?: string; - filter_key_ids?: string; - filter_platforms?: string; - filter_untranslated?: NumericBool; - filter_qa_issues?: string; - filter_archived?: string; -} diff --git a/src/interfaces/language_mapping.ts b/src/interfaces/language_mapping.ts deleted file mode 100644 index b6f526d4..00000000 --- a/src/interfaces/language_mapping.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface LanguageMapping { - original_language_iso: string; - custom_language_iso: string; -} diff --git a/src/interfaces/ota_api_error.ts b/src/interfaces/ota/ota_api_error.ts similarity index 100% rename from src/interfaces/ota_api_error.ts rename to src/interfaces/ota/ota_api_error.ts diff --git a/src/interfaces/ota_bundle.ts b/src/interfaces/ota/ota_bundle.ts similarity index 100% rename from src/interfaces/ota_bundle.ts rename to src/interfaces/ota/ota_bundle.ts diff --git a/src/interfaces/ota_bundle_archive.ts b/src/interfaces/ota/ota_bundle_archive.ts similarity index 100% rename from src/interfaces/ota_bundle_archive.ts rename to src/interfaces/ota/ota_bundle_archive.ts diff --git a/src/interfaces/ota_freeze_period.ts b/src/interfaces/ota/ota_freeze_period.ts similarity index 100% rename from src/interfaces/ota_freeze_period.ts rename to src/interfaces/ota/ota_freeze_period.ts diff --git a/src/interfaces/ota_sdk_token.ts b/src/interfaces/ota/ota_sdk_token.ts similarity index 100% rename from src/interfaces/ota_sdk_token.ts rename to src/interfaces/ota/ota_sdk_token.ts diff --git a/src/interfaces/ota_statistics.ts b/src/interfaces/ota/ota_statistics.ts similarity index 100% rename from src/interfaces/ota_statistics.ts rename to src/interfaces/ota/ota_statistics.ts diff --git a/src/interfaces/ota_framework.ts b/src/interfaces/ota_framework.ts deleted file mode 100644 index 9552f3e7..00000000 --- a/src/interfaces/ota_framework.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface OtaFramework { - framework: "ios_sdk" | "android_sdk" | "flutter_sdk"; -} diff --git a/src/interfaces/ota_team_project.ts b/src/interfaces/ota_team_project.ts deleted file mode 100644 index 2c31478c..00000000 --- a/src/interfaces/ota_team_project.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface OtaTeamProject { - teamId: number | string; - lokaliseProjectId: string; -} diff --git a/src/interfaces/ota_team_project_framework.ts b/src/interfaces/ota_team_project_framework.ts deleted file mode 100644 index 5c3d8237..00000000 --- a/src/interfaces/ota_team_project_framework.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { OtaTeamProject } from "./ota_team_project.js"; -import { OtaFramework } from "./ota_framework.js"; - -export interface OtaTeamProjectFramework extends OtaTeamProject, OtaFramework {} diff --git a/src/interfaces/pagination_params.ts b/src/interfaces/pagination_params.ts deleted file mode 100644 index 4eedbc58..00000000 --- a/src/interfaces/pagination_params.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface PaginationParams { - page?: number; - limit?: number; -} diff --git a/src/interfaces/project_only.ts b/src/interfaces/project_only.ts deleted file mode 100644 index 6e31c12a..00000000 --- a/src/interfaces/project_only.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface ProjectOnly { - project_id: string; -} diff --git a/src/interfaces/project_with_pagination.ts b/src/interfaces/project_with_pagination.ts deleted file mode 100644 index 510705b4..00000000 --- a/src/interfaces/project_with_pagination.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { ProjectOnly } from "./project_only.js"; -import { PaginationParams } from "./pagination_params.js"; - -export interface ProjectWithPagination extends ProjectOnly, PaginationParams {} diff --git a/src/interfaces/team_only.ts b/src/interfaces/team_only.ts deleted file mode 100644 index 91ec4bbc..00000000 --- a/src/interfaces/team_only.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface TeamOnly { - team_id: string | number; -} diff --git a/src/interfaces/team_with_pagination.ts b/src/interfaces/team_with_pagination.ts deleted file mode 100644 index a3ea5904..00000000 --- a/src/interfaces/team_with_pagination.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { TeamOnly } from "./team_only.js"; -import { PaginationParams } from "./pagination_params.js"; - -export interface TeamWithPagination extends TeamOnly, PaginationParams {} diff --git a/src/interfaces/upload_file_params.ts b/src/interfaces/upload_file_params.ts deleted file mode 100644 index f7c152ed..00000000 --- a/src/interfaces/upload_file_params.ts +++ /dev/null @@ -1,28 +0,0 @@ -import type { FileFormat } from "../types/file_format.js"; - -export interface UploadFileParams { - data: string; - filename: string; - lang_iso: string; - convert_placeholders?: boolean; - detect_icu_plurals?: boolean; - tags?: string[]; - tag_inserted_keys?: boolean; - tag_updated_keys?: boolean; - tag_skipped_keys?: boolean; - replace_modified?: boolean; - slashn_to_linebreak?: boolean; - keys_to_values?: boolean; - distinguish_by_file?: boolean; - apply_tm?: boolean; - use_automations?: boolean; - hidden_from_contributors?: boolean; - cleanup_mode?: boolean; - custom_translation_status_ids?: string[] | number[]; - custom_translation_status_inserted_keys?: boolean; - custom_translation_status_updated_keys?: boolean; - custom_translation_status_skipped_keys?: boolean; - skip_detect_lang_iso?: boolean; - format?: FileFormat; - filter_task_id?: number; -} diff --git a/src/main.ts b/src/main.ts index fafdbe07..cb701422 100644 --- a/src/main.ts +++ b/src/main.ts @@ -11,4 +11,4 @@ export { LokaliseOtaBundles, }; export * from "./interfaces/index.js"; -export * from "./types/index.js"; +export type * from "./types/index.js"; diff --git a/src/models/ota_api_error.ts b/src/models/ota/ota_api_error.ts similarity index 53% rename from src/models/ota_api_error.ts rename to src/models/ota/ota_api_error.ts index 0b73e79a..b69cb641 100644 --- a/src/models/ota_api_error.ts +++ b/src/models/ota/ota_api_error.ts @@ -1,5 +1,5 @@ -import { OtaApiError as OtaApiErrorInterface } from "../interfaces/ota_api_error.js"; -import { BaseModel } from "./base_model.js"; +import { OtaApiError as OtaApiErrorInterface } from "../../interfaces/ota/ota_api_error.js"; +import { BaseModel } from "../base_model.js"; export class OtaApiError extends BaseModel implements OtaApiErrorInterface { declare statusCode: string; diff --git a/src/models/ota_bundle.ts b/src/models/ota/ota_bundle.ts similarity index 77% rename from src/models/ota_bundle.ts rename to src/models/ota/ota_bundle.ts index c1a74085..3e70797e 100644 --- a/src/models/ota_bundle.ts +++ b/src/models/ota/ota_bundle.ts @@ -1,5 +1,5 @@ -import { OtaBundle as OtaBundleInterface } from "../interfaces/ota_bundle.js"; -import { BaseModel } from "./base_model.js"; +import { OtaBundle as OtaBundleInterface } from "../../interfaces/ota/ota_bundle.js"; +import { BaseModel } from "./../base_model.js"; export class OtaBundle extends BaseModel implements OtaBundleInterface { declare id: number; diff --git a/src/models/ota_bundle_archive.ts b/src/models/ota/ota_bundle_archive.ts similarity index 69% rename from src/models/ota_bundle_archive.ts rename to src/models/ota/ota_bundle_archive.ts index f672472c..fc785192 100644 --- a/src/models/ota_bundle_archive.ts +++ b/src/models/ota/ota_bundle_archive.ts @@ -1,5 +1,5 @@ -import { OtaBundleArchive as OtaBundleArchiveInterface } from "../interfaces/ota_bundle_archive.js"; -import { BaseModel } from "./base_model.js"; +import { OtaBundleArchive as OtaBundleArchiveInterface } from "../../interfaces/ota/ota_bundle_archive.js"; +import { BaseModel } from "./../base_model.js"; export class OtaBundleArchive extends BaseModel diff --git a/src/models/ota_freeze_period.ts b/src/models/ota/ota_freeze_period.ts similarity index 77% rename from src/models/ota_freeze_period.ts rename to src/models/ota/ota_freeze_period.ts index cd367822..7cbb12de 100644 --- a/src/models/ota_freeze_period.ts +++ b/src/models/ota/ota_freeze_period.ts @@ -1,5 +1,5 @@ -import { OtaFreezePeriod as OtaFreezePeriodInterface } from "../interfaces/ota_freeze_period.js"; -import { BaseModel } from "./base_model.js"; +import { OtaFreezePeriod as OtaFreezePeriodInterface } from "../../interfaces/ota/ota_freeze_period.js"; +import { BaseModel } from "./../base_model.js"; export class OtaFreezePeriod extends BaseModel diff --git a/src/models/ota_sdk_token.ts b/src/models/ota/ota_sdk_token.ts similarity index 60% rename from src/models/ota_sdk_token.ts rename to src/models/ota/ota_sdk_token.ts index c6de25b4..8b28cb83 100644 --- a/src/models/ota_sdk_token.ts +++ b/src/models/ota/ota_sdk_token.ts @@ -1,5 +1,5 @@ -import { BaseModel } from "./base_model.js"; -import { OtaSdkToken as OtaSdkTokenInterface } from "../interfaces/ota_sdk_token.js"; +import { BaseModel } from "./../base_model.js"; +import { OtaSdkToken as OtaSdkTokenInterface } from "../../interfaces/ota/ota_sdk_token.js"; export class OtaSdkToken extends BaseModel implements OtaSdkTokenInterface { declare id: number; diff --git a/src/models/ota_statistics.ts b/src/models/ota/ota_statistics.ts similarity index 79% rename from src/models/ota_statistics.ts rename to src/models/ota/ota_statistics.ts index dd8e4411..3bf49dd1 100644 --- a/src/models/ota_statistics.ts +++ b/src/models/ota/ota_statistics.ts @@ -1,5 +1,5 @@ -import { OtaStatistics as OtaStatisticsInterface } from "../interfaces/ota_statistics.js"; -import { BaseModel } from "./base_model.js"; +import { OtaStatistics as OtaStatisticsInterface } from "../../interfaces/ota/ota_statistics.js"; +import { BaseModel } from "./../base_model.js"; export class OtaStatistics extends BaseModel implements OtaStatisticsInterface { declare lokaliseProjectId: string; diff --git a/src/oauth2/auth_request.ts b/src/oauth2/auth_request.ts index edc0c292..bd135375 100644 --- a/src/oauth2/auth_request.ts +++ b/src/oauth2/auth_request.ts @@ -1,6 +1,6 @@ import { LokalisePkg } from "../lokalise/pkg.js"; -import { HttpMethod } from "../types/http_method.js"; import { AuthData as AuthDataInterface } from "../interfaces/auth_data.js"; +import type { HttpMethod } from "../types/http_method.js"; export class AuthRequest { static async createPromise( diff --git a/src/ota_collections/ota_bundle_management.ts b/src/ota_collections/ota_bundle_management.ts index 20a14850..8b9f49a6 100644 --- a/src/ota_collections/ota_bundle_management.ts +++ b/src/ota_collections/ota_bundle_management.ts @@ -1,11 +1,10 @@ import { OtaCollection } from "./ota_collection.js"; -import { OtaBundle } from "../models/ota_bundle.js"; -import { OtaTeamProject } from "../interfaces/ota_team_project.js"; -import { OtaResourceDeleted } from "../types/ota_resource_deleted.js"; - -type BundleUpdateData = { - description: string; -}; +import { OtaBundle } from "../models/ota/ota_bundle.js"; +import type { + OtaResourceDeleted, + OtaTeamProject, + OtaBundleUpdateData, +} from "../types/ota.js"; export class OtaBundleManagement extends OtaCollection { protected static rootElementName = "data"; @@ -27,7 +26,7 @@ export class OtaBundleManagement extends OtaCollection { update( bundleId: string | number, - bundleParams: BundleUpdateData, + bundleParams: OtaBundleUpdateData, requestParams: OtaTeamProject, ): Promise { return this.doUpdate( diff --git a/src/ota_collections/ota_bundle_publishing.ts b/src/ota_collections/ota_bundle_publishing.ts index 9a98c876..7b42c407 100644 --- a/src/ota_collections/ota_bundle_publishing.ts +++ b/src/ota_collections/ota_bundle_publishing.ts @@ -1,5 +1,5 @@ import { OtaCollection } from "./ota_collection.js"; -import { OtaTeamProjectFramework } from "../interfaces/ota_team_project_framework.js"; +import type { OtaTeamProjectFramework } from "../types/ota.js"; export class OtaBundlePublishing extends OtaCollection { protected static prefixURI = diff --git a/src/ota_collections/ota_bundles.ts b/src/ota_collections/ota_bundles.ts index 50549889..02c3c960 100644 --- a/src/ota_collections/ota_bundles.ts +++ b/src/ota_collections/ota_bundles.ts @@ -1,16 +1,9 @@ import { OtaCollection } from "./ota_collection.js"; -import { OtaBundleArchive } from "../models/ota_bundle_archive.js"; -import { OtaFramework } from "../interfaces/ota_framework.js"; - -type RequestBundleParams = { - appVersion: string; - transVersion: number; - prerelease?: boolean; -}; - -interface OtaProjectFramework extends OtaFramework { - lokaliseProjectId: string; -} +import { OtaBundleArchive } from "../models/ota/ota_bundle_archive.js"; +import type { + OtaRequestBundleParams, + OtaProjectFramework, +} from "../types/ota.js"; export class OtaBundles extends OtaCollection { protected static rootElementNameSingular = "data"; @@ -19,7 +12,7 @@ export class OtaBundles extends OtaCollection { protected static elementClass = OtaBundleArchive; get( - bundle_params: RequestBundleParams, + bundle_params: OtaRequestBundleParams, request_params: OtaProjectFramework, ): Promise { const params = { diff --git a/src/ota_collections/ota_freeze_periods.ts b/src/ota_collections/ota_freeze_periods.ts index ee594942..335c764b 100644 --- a/src/ota_collections/ota_freeze_periods.ts +++ b/src/ota_collections/ota_freeze_periods.ts @@ -1,14 +1,11 @@ import { OtaCollection } from "./ota_collection.js"; -import { OtaFreezePeriod } from "../models/ota_freeze_period.js"; -import { OtaTeamProject } from "../interfaces/ota_team_project.js"; -import { OtaTeamProjectFramework } from "../interfaces/ota_team_project_framework.js"; -import { OtaResourceDeleted } from "../types/ota_resource_deleted.js"; - -type FreezePeriodParams = { - from: string; - to: string; - bundleId: number | string; -}; +import { OtaFreezePeriod } from "../models/ota/ota_freeze_period.js"; +import type { + OtaTeamProject, + OtaTeamProjectFramework, + OtaResourceDeleted, + OtaFreezePeriodParams, +} from "../types/ota.js"; export class OtaFreezePeriods extends OtaCollection { protected static rootElementName = "data"; @@ -22,7 +19,7 @@ export class OtaFreezePeriods extends OtaCollection { } create( - freezeParams: FreezePeriodParams, + freezeParams: OtaFreezePeriodParams, requestParams: OtaTeamProject, ): Promise { return this.doCreate( @@ -34,7 +31,7 @@ export class OtaFreezePeriods extends OtaCollection { update( freezeId: string | number, - freezeParams: FreezePeriodParams, + freezeParams: OtaFreezePeriodParams, requestParams: OtaTeamProject, ): Promise { return this.doUpdate(freezeId, freezeParams, requestParams); diff --git a/src/ota_collections/ota_sdk_tokens.ts b/src/ota_collections/ota_sdk_tokens.ts index 53563b44..bbfd893d 100644 --- a/src/ota_collections/ota_sdk_tokens.ts +++ b/src/ota_collections/ota_sdk_tokens.ts @@ -1,7 +1,6 @@ import { OtaCollection } from "./ota_collection.js"; -import { OtaSdkToken } from "../models/ota_sdk_token.js"; -import { OtaTeamProject } from "../interfaces/ota_team_project.js"; -import { OtaResourceDeleted } from "../types/ota_resource_deleted.js"; +import { OtaSdkToken } from "../models/ota/ota_sdk_token.js"; +import type { OtaTeamProject, OtaResourceDeleted } from "../types/ota.js"; export class OtaSdkTokens extends OtaCollection { protected static rootElementName = "data"; diff --git a/src/ota_collections/ota_usage_statistics.ts b/src/ota_collections/ota_usage_statistics.ts index 172169df..8c64fb1d 100644 --- a/src/ota_collections/ota_usage_statistics.ts +++ b/src/ota_collections/ota_usage_statistics.ts @@ -1,12 +1,6 @@ import { OtaCollection } from "./ota_collection.js"; -import { OtaStatistics } from "../models/ota_statistics.js"; -import { OtaTeamProject } from "../interfaces/ota_team_project.js"; - -type OtaUsageParams = { - dateFrom: string; - dateTo: string; - framework?: string; -}; +import { OtaStatistics } from "../models/ota/ota_statistics.js"; +import type { OtaTeamProject, OtaUsageParams } from "../types/ota.js"; export class OtaUsageStatistics extends OtaCollection { protected static prefixURI = diff --git a/src/types/billing_details_params.ts b/src/types/billing_details.ts similarity index 100% rename from src/types/billing_details_params.ts rename to src/types/billing_details.ts diff --git a/src/types/branch_params.ts b/src/types/branch_params.ts deleted file mode 100644 index 88306000..00000000 --- a/src/types/branch_params.ts +++ /dev/null @@ -1,3 +0,0 @@ -export type BranchParams = { - name?: string; -}; diff --git a/src/types/branches.ts b/src/types/branches.ts new file mode 100644 index 00000000..3cf98134 --- /dev/null +++ b/src/types/branches.ts @@ -0,0 +1,22 @@ +import { Branch } from "../interfaces/branch.js"; + +export type BranchParams = { + name?: string; +}; + +export type MergeBranchParams = { + force_conflict_resolve_using?: string; + target_branch_id?: number | string; +}; + +export type BranchDeleted = { + project_id: string; + branch_deleted: boolean; +}; + +export type BranchMerged = { + project_id: string; + branch_merged: boolean; + branch: Branch; + target_branch: Branch; +}; diff --git a/src/types/bulk_update_key_params.ts b/src/types/bulk_update_key_params.ts deleted file mode 100644 index 9be6f07a..00000000 --- a/src/types/bulk_update_key_params.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { UpdateKeyDataWithId } from "./update_key_data_with_id.js"; - -export type BulkUpdateKeyParams = { - keys?: UpdateKeyDataWithId[]; - use_automations?: boolean; -}; diff --git a/src/types/create_card_params.ts b/src/types/cards.ts similarity index 64% rename from src/types/create_card_params.ts rename to src/types/cards.ts index 2a348a39..f139deba 100644 --- a/src/types/create_card_params.ts +++ b/src/types/cards.ts @@ -4,3 +4,8 @@ export type CreateCardParams = { exp_month: string | number; exp_year: string | number; }; + +export type CardDeleted = { + card_id: string; + card_deleted: boolean; +}; diff --git a/src/types/comment_data.ts b/src/types/comment_data.ts deleted file mode 100644 index 4a3b1661..00000000 --- a/src/types/comment_data.ts +++ /dev/null @@ -1,3 +0,0 @@ -export type CommentData = { - comment?: string; -}; diff --git a/src/types/comments.ts b/src/types/comments.ts new file mode 100644 index 00000000..13a154e1 --- /dev/null +++ b/src/types/comments.ts @@ -0,0 +1,22 @@ +import type { + ProjectOnly, + ProjectWithPagination, +} from "./common_get_params.js"; + +export type CommentData = { + comment?: string; +}; + +export type CommentDeleted = { + project_id: string; + comment_deleted: boolean; + branch?: string; +}; + +export type ProjectAndKey = ProjectOnly & { + key_id: number | string; +}; + +export type KeyProjectPagination = ProjectWithPagination & { + key_id: number | string; +}; diff --git a/src/types/common_get_params.ts b/src/types/common_get_params.ts new file mode 100644 index 00000000..af1af8ed --- /dev/null +++ b/src/types/common_get_params.ts @@ -0,0 +1,14 @@ +export type TeamOnly = { + team_id: string | number; +}; + +export type ProjectOnly = { + project_id: string; +}; + +export type PaginationParams = { + page?: number; + limit?: number; +}; + +export type ProjectWithPagination = ProjectOnly & PaginationParams; diff --git a/src/types/contributor_create_data.ts b/src/types/contributor_create_data.ts deleted file mode 100644 index 29180131..00000000 --- a/src/types/contributor_create_data.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { ContributorRights } from "./contributor_rights.js"; -import { ContributorLanguages } from "./contributor_languages.js"; - -export type ContributorCreateData = { - email: string; - fullname?: string; - is_admin?: boolean; - is_reviewer?: boolean; - languages: ContributorLanguages[]; - admin_rights?: ContributorRights[]; -}; diff --git a/src/types/contributor_languages.ts b/src/types/contributor_languages.ts deleted file mode 100644 index 774139dd..00000000 --- a/src/types/contributor_languages.ts +++ /dev/null @@ -1,4 +0,0 @@ -export type ContributorLanguages = { - lang_iso: string; - is_writable?: boolean; -}; diff --git a/src/types/contributor_update_data.ts b/src/types/contributor_update_data.ts deleted file mode 100644 index 2d5a9898..00000000 --- a/src/types/contributor_update_data.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { ContributorRights } from "./contributor_rights.js"; -import { ContributorLanguages } from "./contributor_languages.js"; - -export type ContributorUpdateData = { - is_admin?: boolean; - is_reviewer?: boolean; - languages?: ContributorLanguages[]; - admin_rights?: ContributorRights[]; -}; diff --git a/src/types/contributors.ts b/src/types/contributors.ts new file mode 100644 index 00000000..7d750600 --- /dev/null +++ b/src/types/contributors.ts @@ -0,0 +1,28 @@ +import type { ContributorRights } from "./contributor_rights.js"; + +export type ContributorLanguages = { + lang_iso: string; + is_writable?: boolean; +}; + +export type ContributorCreateData = { + email: string; + fullname?: string; + is_admin?: boolean; + is_reviewer?: boolean; + languages: ContributorLanguages[]; + admin_rights?: ContributorRights[]; +}; + +export type ContributorUpdateData = { + is_admin?: boolean; + is_reviewer?: boolean; + languages?: ContributorLanguages[]; + admin_rights?: ContributorRights[]; +}; + +export type ContributorDeleted = { + project_id: string; + contributor_deleted: boolean; + branch?: string; +}; diff --git a/src/types/create_key_data.ts b/src/types/create_key_data.ts deleted file mode 100644 index ac205676..00000000 --- a/src/types/create_key_data.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { SupportedPlatforms } from "../types/supported_platforms.js"; -import { Filenames, Filenames as Keynames } from "../types/filenames.js"; -import { CommentData } from "../types/comment_data.js"; -import { ScreenshotData } from "../types/screenshot_data.js"; -import { TranslationData } from "../types/translation_data.js"; - -export type CreateKeyData = { - key_name: string | Keynames; - description?: string; - platforms: SupportedPlatforms[]; - filenames?: Filenames; - tags?: string[]; - comments?: CommentData[]; - screenshots?: ScreenshotData[]; - translations?: TranslationData[]; - is_plural?: boolean; - plural_name?: string; - is_hidden?: boolean; - is_archived?: boolean; - context?: string; - char_limit?: number; - custom_attributes?: string; -}; diff --git a/src/types/create_key_params.ts b/src/types/create_key_params.ts deleted file mode 100644 index ee143512..00000000 --- a/src/types/create_key_params.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { CreateKeyData } from "./create_key_data.js"; - -export type CreateKeyParams = { - keys?: CreateKeyData[]; - use_automations?: boolean; -}; diff --git a/src/types/create_language_params.ts b/src/types/create_language_params.ts deleted file mode 100644 index 10327073..00000000 --- a/src/types/create_language_params.ts +++ /dev/null @@ -1,6 +0,0 @@ -export type CreateLanguageParams = { - lang_iso: string; - custom_iso?: string; - custom_name?: string; - custom_plural_forms?: string[]; -}; diff --git a/src/types/create_project_params.ts b/src/types/create_project_params.ts deleted file mode 100644 index 013a31bc..00000000 --- a/src/types/create_project_params.ts +++ /dev/null @@ -1,12 +0,0 @@ -export type CreateProjectParams = { - name: string; - team_id?: number | string; - description?: string; - languages?: Array<{ - lang_iso: string; - custom_iso?: string; - }>; - base_lang_iso?: string; - project_type?: "localization_files" | "paged_documents"; - is_segmentation_enabled?: boolean; -}; diff --git a/src/types/create_screenshot_params.ts b/src/types/create_screenshot_params.ts deleted file mode 100644 index 28d2838a..00000000 --- a/src/types/create_screenshot_params.ts +++ /dev/null @@ -1,8 +0,0 @@ -export type CreateScreenshotParams = { - data: string; - title?: string; - description?: string; - ocr?: boolean; - key_ids?: string[] | number[]; - tags?: string[]; -}; diff --git a/src/types/create_snapshot_params.ts b/src/types/create_snapshot_params.ts deleted file mode 100644 index 89352a9b..00000000 --- a/src/types/create_snapshot_params.ts +++ /dev/null @@ -1,3 +0,0 @@ -export type CreateSnapshotParams = { - title: string; -}; diff --git a/src/types/create_task_params.ts b/src/types/create_task_params.ts deleted file mode 100644 index d96a5cbb..00000000 --- a/src/types/create_task_params.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { TaskLanguage } from "./task_language.js"; - -export type CreateTaskParams = { - title: string; - description?: string; - due_date?: string; - keys?: string[] | number[]; - languages?: Array; - source_language_iso?: string; - auto_close_languages?: boolean; - auto_close_task?: boolean; - auto_close_items?: boolean; - task_type?: string; - parent_task_id?: string | number; - closing_tags?: string[]; - do_lock_translations?: boolean; - custom_translation_status_ids?: string[] | number[]; -}; diff --git a/src/types/create_translation_status_params.ts b/src/types/create_translation_status_params.ts deleted file mode 100644 index 87f5ca30..00000000 --- a/src/types/create_translation_status_params.ts +++ /dev/null @@ -1,4 +0,0 @@ -export type CreateTranslationStatusParams = { - title: string; - color: string; -}; diff --git a/src/types/create_webhook_params.ts b/src/types/create_webhook_params.ts deleted file mode 100644 index 952cb4ad..00000000 --- a/src/types/create_webhook_params.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { WebhookEventLangMap } from "./webhook_event_lang_map.js"; - -export type CreateWebhookParams = { - url: string; - branch?: string; - events: string[]; - event_lang_map?: WebhookEventLangMap[]; -}; diff --git a/src/types/download_bundle.ts b/src/types/download_bundle.ts deleted file mode 100644 index dfd4dd61..00000000 --- a/src/types/download_bundle.ts +++ /dev/null @@ -1,5 +0,0 @@ -export type DownloadBundle = { - project_id: string; - bundle_url: string; - branch?: string; -}; diff --git a/src/interfaces/download_file_params.ts b/src/types/files.ts similarity index 61% rename from src/interfaces/download_file_params.ts rename to src/types/files.ts index 917d1884..1f2a7cbd 100644 --- a/src/interfaces/download_file_params.ts +++ b/src/types/files.ts @@ -1,5 +1,21 @@ -import { LanguageMapping } from "./language_mapping.js"; -import type { FileFormat } from "../types/file_format.js"; +import type { FileFormat } from "./file_format.js"; +import type { ProjectWithPagination } from "./common_get_params.js"; + +export type DownloadBundle = { + project_id: string; + bundle_url: string; + branch?: string; +}; + +export type FileDeleted = { + project_id: string; + file_deleted: boolean; +}; + +type LanguageMapping = { + original_language_iso: string; + custom_language_iso: string; +}; type FilterData = | "translated" @@ -96,3 +112,34 @@ export interface DownloadFileParams { filter_task_id?: number; compact?: boolean; } + +export type UploadFileParams = { + data: string; + filename: string; + lang_iso: string; + convert_placeholders?: boolean; + detect_icu_plurals?: boolean; + tags?: string[]; + tag_inserted_keys?: boolean; + tag_updated_keys?: boolean; + tag_skipped_keys?: boolean; + replace_modified?: boolean; + slashn_to_linebreak?: boolean; + keys_to_values?: boolean; + distinguish_by_file?: boolean; + apply_tm?: boolean; + use_automations?: boolean; + hidden_from_contributors?: boolean; + cleanup_mode?: boolean; + custom_translation_status_ids?: string[] | number[]; + custom_translation_status_inserted_keys?: boolean; + custom_translation_status_updated_keys?: boolean; + custom_translation_status_skipped_keys?: boolean; + skip_detect_lang_iso?: boolean; + format?: FileFormat; + filter_task_id?: number; +}; + +export type ListFileParams = ProjectWithPagination & { + filter_filename?: string; +}; diff --git a/src/types/index.ts b/src/types/index.ts index 598f96f6..a0892bb9 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -1,74 +1,150 @@ -export { BulkUpdateKeyParams } from "./bulk_update_key_params.js"; -export { CommentData } from "./comment_data.js"; -export { CreateKeyData } from "./create_key_data.js"; -export { CreateKeyParams } from "./create_key_params.js"; -export { HttpMethod } from "./http_method.js"; -export { Filenames } from "./filenames.js"; -export { ScreenshotData } from "./screenshot_data.js"; -export { SupportedPlatforms } from "./supported_platforms.js"; -export { NumericBool } from "./numeric_bool.js"; -export { TeamUserParams } from "./team_user_params.js"; -export { TranslationData } from "./translation_data.js"; -export { UpdateKeyDataWithId } from "./update_key_data_with_id.js"; -export { UpdateKeyData } from "./update_key_data.js"; -export { OtaResourceDeleted } from "./ota_resource_deleted.js"; -export { UserGroupParams } from "./user_group_params.js"; -export { UpdateTaskParams } from "./update_task_params.js"; -export { CreateTaskParams } from "./create_task_params.js"; -export { TaskLanguage } from "./task_language.js"; -export { BranchParams } from "./branch_params.js"; -export { MergeBranchParams } from "./merge_branch_params.js"; -export { ContributorRights } from "./contributor_rights.js"; -export { ContributorLanguages } from "./contributor_languages.js"; -export { ContributorCreateData } from "./contributor_create_data.js"; -export { ContributorUpdateData } from "./contributor_update_data.js"; -export { DownloadBundle } from "./download_bundle.js"; -export { CreateLanguageParams } from "./create_language_params.js"; -export { UpdateLanguageParams } from "./update_language_params.js"; -export { CreateOrderParams } from "./create_order_params.js"; -export { CreateCardParams } from "./create_card_params.js"; -export { CreateProjectParams } from "./create_project_params.js"; -export { UpdateProjectParams } from "./update_project_params.js"; -export { CreateScreenshotParams } from "./create_screenshot_params.js"; -export { UpdateScreenshotParams } from "./update_screenshot_params.js"; -export { CreateSnapshotParams } from "./create_snapshot_params.js"; -export { BillingDetailsParams } from "./billing_details_params.js"; -export { CreateTranslationStatusParams } from "./create_translation_status_params.js"; -export { UpdateTranslationStatusParams } from "./update_translation_status_params.js"; -export { UpdateTranslationParams } from "./update_translation_params.js"; -export { WebhookEventLangMap } from "./webhook_event_lang_map.js"; -export { CreateWebhookParams } from "./create_webhook_params.js"; -export { UpdateWebhookParams } from "./update_webhook_params.js"; +export type { + BranchParams, + MergeBranchParams, + BranchDeleted, + BranchMerged, +} from "./branches.js"; +export type { + CommentData, + CommentDeleted, + ProjectAndKey, + KeyProjectPagination, +} from "./comments.js"; +export type { + ContributorCreateData, + ContributorUpdateData, + ContributorDeleted, + ContributorLanguages, +} from "./contributors.js"; +export type { ContributorRights } from "./contributor_rights.js"; +export type { + DownloadBundle, + FileDeleted, + DownloadFileParams, + ListFileParams, +} from "./files.js"; +export type { + CreateKeyData, + CreateKeyParams, + UpdateKeyData, + BulkUpdateKeyParams, + UpdateKeyDataWithId, + KeyDeleted, + KeysBulkDeleted, + KeyParamsWithPagination, + GetKeyParams, +} from "./keys.js"; +export type { + CreateLanguageParams, + UpdateLanguageParams, + LanguageDeleted, +} from "./languages.js"; +export type { CreateOrderParams } from "./orders.js"; +export type { CreateCardParams, CardDeleted } from "./cards.js"; +export type { + CreateProjectParams, + UpdateProjectParams, + ProjectDeleted, + ProjectEmptied, + ProjectListParams, +} from "./projects.js"; +export type { + CreateScreenshotParams, + UpdateScreenshotParams, + ScreenshotDeleted, + ScreenshotData, +} from "./screenshots.js"; +export type { + GetSegmentParams, + UpdateSegmentReqParams, + UpdateSegmentBodyParams, + ListSegmentParams, +} from "./segments.js"; +export type { CreateSnapshotParams, SnapshotDeleted } from "./snapshots.js"; +export type { + CreateTaskParams, + TaskLanguage, + UpdateTaskParams, + TaskDeleted, + ListTaskParams, +} from "./tasks.js"; +export type { BillingDetailsParams } from "./billing_details.js"; +export type { TeamWithPagination } from "./teams.js"; +export type { TeamUserParams, TeamUserDeleted } from "./team_users.js"; +export type { + CreateTranslationStatusParams, + UpdateTranslationStatusParams, + TranslationStatusDeleted, + TranslationStatusColors, +} from "./translation_statuses.js"; +export type { + UpdateTranslationParams, + TranslationData, + ListTranslationParams, + GetTranslationParams, +} from "./translations.js"; +export type { UserGroupParams, UserGroupDeleted } from "./user_groups.js"; +export type { + WebhookEventLangMap, + CreateWebhookParams, + UpdateWebhookParams, + WebhookDeleted, + WebhookRegenerated, +} from "./webhooks.js"; -export { WebhookProjectImported } from "./webhook_events/project_imported.js"; -export { WebhookProjectExported } from "./webhook_events/project_exported.js"; -export { WebhookProjectCopied } from "./webhook_events/project_copied.js"; -export { WebhookProjectDeleted } from "./webhook_events/project_deleted.js"; -export { WebhookProjectSnapshotCreated } from "./webhook_events/project_snapshot_created.js"; -export { WebhookProjectBranchAdded } from "./webhook_events/project_branch_added.js"; -export { WebhookProjectBranchDeleted } from "./webhook_events/project_branch_deleted.js"; -export { WebhookProjectBranchMerged } from "./webhook_events/project_branch_merged.js"; -export { WebhookProjectLanguagesAdded } from "./webhook_events/project_languages_added.js"; -export { WebhookProjectLanguageRemoved } from "./webhook_events/project_language_removed.js"; -export { WebhookProjectLanguageSettingsChanged } from "./webhook_events/project_language_settings_changed.js"; -export { WebhookProjectKeyAdded } from "./webhook_events/project_key_added.js"; -export { WebhookProjectKeysAdded } from "./webhook_events/project_keys_added.js"; -export { WebhookProjectKeyModified } from "./webhook_events/project_key_modified.js"; -export { WebhookProjectKeysModified } from "./webhook_events/project_keys_modified.js"; -export { WebhookProjectKeysDeleted } from "./webhook_events/project_keys_deleted.js"; -export { WebhookProjectKeyCommentAdded } from "./webhook_events/project_key_comment_added.js"; -export { WebhookProjectTranslationUpdated } from "./webhook_events/project_translation_updated.js"; -export { WebhookProjectTranslationsUpdated } from "./webhook_events/project_translations_updated.js"; -export { WebhookProjectTranslationProofread } from "./webhook_events/project_translation_proofread.js"; -export { WebhookProjectContributorAdded } from "./webhook_events/project_contributor_added.js"; -export { WebhookProjectContributorAddedPublic } from "./webhook_events/project_contributor_added_public.js"; -export { WebhookProjectContributorDeleted } from "./webhook_events/project_contributor_deleted.js"; -export { WebhookProjectTaskQueued } from "./webhook_events/project_task_queued.js"; -export { WebhookProjectTaskCreated } from "./webhook_events/project_task_created.js"; -export { WebhookProjectTaskClosed } from "./webhook_events/project_task_closed.js"; -export { WebhookProjectTaskDeleted } from "./webhook_events/project_task_deleted.js"; -export { WebhookProjectTaskLanguageClosed } from "./webhook_events/project_task_language_closed.js"; -export { WebhookTeamOrderCreated } from "./webhook_events/team_order_created.js"; -export { WebhookTeamOrderDeleted } from "./webhook_events/team_order_deleted.js"; -export { WebhookTeamOrderCompleted } from "./webhook_events/team_order_completed.js"; -export { WebhookProjectTaskInitialTmLeverageCalculated } from "./webhook_events/project_task_initial_tm_leverage_calculated.js"; +export type { + OtaResourceDeleted, + OtaTeamProject, + OtaFramework, + OtaTeamProjectFramework, + OtaFreezePeriodParams, + OtaUsageParams, + OtaBundleUpdateData, + OtaRequestBundleParams, + OtaProjectFramework, +} from "./ota.js"; + +export type { + TeamOnly, + ProjectOnly, + PaginationParams, + ProjectWithPagination, +} from "./common_get_params.js"; +export type { Filenames } from "./filenames.js"; +export type { SupportedPlatforms } from "./supported_platforms.js"; +export type { NumericBool } from "./numeric_bool.js"; + +export type { HttpMethod } from "./http_method.js"; + +export type { WebhookProjectImported } from "./webhook_events/project_imported.js"; +export type { WebhookProjectExported } from "./webhook_events/project_exported.js"; +export type { WebhookProjectCopied } from "./webhook_events/project_copied.js"; +export type { WebhookProjectDeleted } from "./webhook_events/project_deleted.js"; +export type { WebhookProjectSnapshotCreated } from "./webhook_events/project_snapshot_created.js"; +export type { WebhookProjectBranchAdded } from "./webhook_events/project_branch_added.js"; +export type { WebhookProjectBranchDeleted } from "./webhook_events/project_branch_deleted.js"; +export type { WebhookProjectBranchMerged } from "./webhook_events/project_branch_merged.js"; +export type { WebhookProjectLanguagesAdded } from "./webhook_events/project_languages_added.js"; +export type { WebhookProjectLanguageRemoved } from "./webhook_events/project_language_removed.js"; +export type { WebhookProjectLanguageSettingsChanged } from "./webhook_events/project_language_settings_changed.js"; +export type { WebhookProjectKeyAdded } from "./webhook_events/project_key_added.js"; +export type { WebhookProjectKeysAdded } from "./webhook_events/project_keys_added.js"; +export type { WebhookProjectKeyModified } from "./webhook_events/project_key_modified.js"; +export type { WebhookProjectKeysModified } from "./webhook_events/project_keys_modified.js"; +export type { WebhookProjectKeysDeleted } from "./webhook_events/project_keys_deleted.js"; +export type { WebhookProjectKeyCommentAdded } from "./webhook_events/project_key_comment_added.js"; +export type { WebhookProjectTranslationUpdated } from "./webhook_events/project_translation_updated.js"; +export type { WebhookProjectTranslationsUpdated } from "./webhook_events/project_translations_updated.js"; +export type { WebhookProjectTranslationProofread } from "./webhook_events/project_translation_proofread.js"; +export type { WebhookProjectContributorAdded } from "./webhook_events/project_contributor_added.js"; +export type { WebhookProjectContributorAddedPublic } from "./webhook_events/project_contributor_added_public.js"; +export type { WebhookProjectContributorDeleted } from "./webhook_events/project_contributor_deleted.js"; +export type { WebhookProjectTaskQueued } from "./webhook_events/project_task_queued.js"; +export type { WebhookProjectTaskCreated } from "./webhook_events/project_task_created.js"; +export type { WebhookProjectTaskClosed } from "./webhook_events/project_task_closed.js"; +export type { WebhookProjectTaskDeleted } from "./webhook_events/project_task_deleted.js"; +export type { WebhookProjectTaskLanguageClosed } from "./webhook_events/project_task_language_closed.js"; +export type { WebhookTeamOrderCreated } from "./webhook_events/team_order_created.js"; +export type { WebhookTeamOrderDeleted } from "./webhook_events/team_order_deleted.js"; +export type { WebhookTeamOrderCompleted } from "./webhook_events/team_order_completed.js"; +export type { WebhookProjectTaskInitialTmLeverageCalculated } from "./webhook_events/project_task_initial_tm_leverage_calculated.js"; diff --git a/src/types/keys.ts b/src/types/keys.ts new file mode 100644 index 00000000..d026c3d8 --- /dev/null +++ b/src/types/keys.ts @@ -0,0 +1,82 @@ +import type { SupportedPlatforms } from "./supported_platforms.js"; +import type { Filenames, Filenames as Keynames } from "./filenames.js"; +import type { CommentData } from "./comments.js"; +import type { ScreenshotData } from "./screenshots.js"; +import type { TranslationData } from "./translations.js"; +import type { + ProjectWithPagination, + ProjectOnly, +} from "./common_get_params.js"; +import type { NumericBool } from "./numeric_bool.js"; + +export type CreateKeyData = { + key_name: string | Keynames; + description?: string; + platforms: SupportedPlatforms[]; + filenames?: Filenames; + tags?: string[]; + comments?: CommentData[]; + screenshots?: ScreenshotData[]; + translations?: TranslationData[]; + is_plural?: boolean; + plural_name?: string; + is_hidden?: boolean; + is_archived?: boolean; + context?: string; + char_limit?: number; + custom_attributes?: string; +}; + +export type CreateKeyParams = { + keys?: CreateKeyData[]; + use_automations?: boolean; +}; + +export type UpdateKeyData = Omit & { + key_name?: string | Keynames; + merge_tags?: boolean; + platforms?: SupportedPlatforms[]; +}; + +export type BulkUpdateKeyParams = { + keys?: UpdateKeyDataWithId[]; + use_automations?: boolean; +}; + +export type UpdateKeyDataWithId = UpdateKeyData & { + key_id: string | number; +}; + +export type KeyDeleted = { + project_id: string; + key_removed: boolean; + keys_locked?: number; + branch?: string; +}; + +export type KeysBulkDeleted = { + project_id: string; + keys_removed: boolean; + keys_locked: number; + branch?: string; +}; + +export type KeyParamsWithPagination = ProjectWithPagination & { + disable_references?: NumericBool; + include_comments?: NumericBool; + include_screenshots?: NumericBool; + include_translations?: NumericBool; + filter_translation_lang_ids?: string; + filter_tags?: string; + filter_filenames?: string; + filter_keys?: string; + filter_key_ids?: string; + filter_platforms?: string; + filter_untranslated?: NumericBool; + filter_qa_issues?: string; + filter_archived?: string; +}; + +export type GetKeyParams = ProjectOnly & { + disable_references?: NumericBool; +}; diff --git a/src/types/languages.ts b/src/types/languages.ts new file mode 100644 index 00000000..2ad7d18a --- /dev/null +++ b/src/types/languages.ts @@ -0,0 +1,18 @@ +export type CreateLanguageParams = { + lang_iso: string; + custom_iso?: string; + custom_name?: string; + custom_plural_forms?: string[]; +}; + +export type UpdateLanguageParams = { + lang_iso?: string; + lang_name?: string; + plural_forms?: string[]; +}; + +export type LanguageDeleted = { + project_id: string; + language_deleted: boolean; + branch?: string; +}; diff --git a/src/types/merge_branch_params.ts b/src/types/merge_branch_params.ts deleted file mode 100644 index 1b1d73b3..00000000 --- a/src/types/merge_branch_params.ts +++ /dev/null @@ -1,4 +0,0 @@ -export type MergeBranchParams = { - force_conflict_resolve_using?: string; - target_branch_id?: number | string; -}; diff --git a/src/types/create_order_params.ts b/src/types/orders.ts similarity index 100% rename from src/types/create_order_params.ts rename to src/types/orders.ts diff --git a/src/types/ota.ts b/src/types/ota.ts new file mode 100644 index 00000000..f60a56f0 --- /dev/null +++ b/src/types/ota.ts @@ -0,0 +1,41 @@ +export type OtaResourceDeleted = { + id: number; + deleted: boolean; +}; + +export type OtaTeamProject = { + teamId: number | string; + lokaliseProjectId: string; +}; + +export type OtaFramework = { + framework: "ios_sdk" | "android_sdk" | "flutter_sdk"; +}; + +export type OtaTeamProjectFramework = OtaTeamProject & OtaFramework; + +export type OtaProjectFramework = OtaFramework & { + lokaliseProjectId: string; +}; + +export type OtaFreezePeriodParams = { + from: string; + to: string; + bundleId: number | string; +}; + +export type OtaUsageParams = { + dateFrom: string; + dateTo: string; + framework?: string; +}; + +export type OtaBundleUpdateData = { + description: string; +}; + +export type OtaRequestBundleParams = { + appVersion: string; + transVersion: number; + prerelease?: boolean; +}; diff --git a/src/types/ota_resource_deleted.ts b/src/types/ota_resource_deleted.ts deleted file mode 100644 index 8f14d310..00000000 --- a/src/types/ota_resource_deleted.ts +++ /dev/null @@ -1,4 +0,0 @@ -export type OtaResourceDeleted = { - id: number; - deleted: boolean; -}; diff --git a/src/types/projects.ts b/src/types/projects.ts new file mode 100644 index 00000000..96243c4b --- /dev/null +++ b/src/types/projects.ts @@ -0,0 +1,36 @@ +import type { PaginationParams } from "./common_get_params.js"; + +export type CreateProjectParams = { + name: string; + team_id?: number | string; + description?: string; + languages?: Array<{ + lang_iso: string; + custom_iso?: string; + }>; + base_lang_iso?: string; + project_type?: "localization_files" | "paged_documents"; + is_segmentation_enabled?: boolean; +}; + +export type UpdateProjectParams = { + name: string; + description?: string; +}; + +export type ProjectDeleted = { + project_id: string; + project_deleted: boolean; +}; + +export type ProjectEmptied = { + project_id: string; + keys_deleted: boolean; +}; + +export type ProjectListParams = PaginationParams & { + filter_team_id?: number | string; + filter_names?: string; + include_statistics?: string | number; + include_settings?: string | number; +}; diff --git a/src/types/screenshot_data.ts b/src/types/screenshot_data.ts deleted file mode 100644 index c2f07566..00000000 --- a/src/types/screenshot_data.ts +++ /dev/null @@ -1,6 +0,0 @@ -export type ScreenshotData = { - title?: string; - description?: string; - screenshot_tags?: string[]; - data?: string; -}; diff --git a/src/types/screenshots.ts b/src/types/screenshots.ts new file mode 100644 index 00000000..2798f4e3 --- /dev/null +++ b/src/types/screenshots.ts @@ -0,0 +1,26 @@ +export type CreateScreenshotParams = { + data: string; + title?: string; + description?: string; + ocr?: boolean; + key_ids?: string[] | number[]; + tags?: string[]; +}; + +export type UpdateScreenshotParams = Omit< + CreateScreenshotParams, + "data" | "ocr" +>; + +export type ScreenshotDeleted = { + project_id: string; + screenshot_deleted: boolean; + branch?: string; +}; + +export type ScreenshotData = { + title?: string; + description?: string; + screenshot_tags?: string[]; + data?: string; +}; diff --git a/src/types/segments.ts b/src/types/segments.ts new file mode 100644 index 00000000..3188031d --- /dev/null +++ b/src/types/segments.ts @@ -0,0 +1,25 @@ +export type GetSegmentParams = { + project_id: string; + key_id: number | string; + language_iso: string; + disable_references?: number | string; +}; + +export type UpdateSegmentReqParams = Omit< + GetSegmentParams, + "disable_references" +>; + +export type UpdateSegmentBodyParams = { + value: string; + is_fuzzy?: boolean; + is_reviewed?: boolean; + custom_translation_status_ids?: string[] | number[]; +}; + +export type ListSegmentParams = GetSegmentParams & { + filter_is_reviewed?: number | string; + filter_unverified?: number | string; + filter_untranslated?: number | string; + filter_qa_issues?: string; +}; diff --git a/src/types/snapshots.ts b/src/types/snapshots.ts new file mode 100644 index 00000000..2f44ca42 --- /dev/null +++ b/src/types/snapshots.ts @@ -0,0 +1,9 @@ +export type CreateSnapshotParams = { + title: string; +}; + +export type SnapshotDeleted = { + project_id: string; + snapshot_deleted: boolean; + branch?: string; +}; diff --git a/src/types/task_language.ts b/src/types/task_language.ts deleted file mode 100644 index 79e8b8aa..00000000 --- a/src/types/task_language.ts +++ /dev/null @@ -1,5 +0,0 @@ -export type TaskLanguage = { - language_iso: string; - users?: string[] | number[]; - groups?: string[] | number[]; -}; diff --git a/src/types/tasks.ts b/src/types/tasks.ts new file mode 100644 index 00000000..39842d38 --- /dev/null +++ b/src/types/tasks.ts @@ -0,0 +1,53 @@ +import type { ProjectWithPagination } from "./common_get_params.js"; + +export type TaskLanguage = { + language_iso: string; + users?: string[] | number[]; + groups?: string[] | number[]; +}; + +export type CreateTaskParams = { + title: string; + description?: string; + due_date?: string; + keys?: string[] | number[]; + languages?: Array; + source_language_iso?: string; + auto_close_languages?: boolean; + auto_close_task?: boolean; + auto_close_items?: boolean; + task_type?: string; + parent_task_id?: string | number; + closing_tags?: string[]; + do_lock_translations?: boolean; + custom_translation_status_ids?: string[] | number[]; +}; + +export type UpdateTaskParams = Omit< + CreateTaskParams, + | "title" + | "keys" + | "source_language_iso" + | "task_type" + | "parent_task_id" + | "custom_translation_status_ids" +> & { + title?: string; + close_task?: boolean; + languages?: Array< + TaskLanguage & { + close_language?: boolean; + } + >; +}; + +export type TaskDeleted = { + project_id: string; + task_deleted: boolean; + branch?: string; +}; + +export type ListTaskParams = ProjectWithPagination & { + filter_title?: string; + filter_statuses?: string; +}; diff --git a/src/types/team_user_params.ts b/src/types/team_user_params.ts deleted file mode 100644 index 060df834..00000000 --- a/src/types/team_user_params.ts +++ /dev/null @@ -1,3 +0,0 @@ -export type TeamUserParams = { - role?: "owner" | "admin" | "member" | "biller"; -}; diff --git a/src/types/team_users.ts b/src/types/team_users.ts new file mode 100644 index 00000000..274a5bd1 --- /dev/null +++ b/src/types/team_users.ts @@ -0,0 +1,8 @@ +export type TeamUserParams = { + role?: "owner" | "admin" | "member" | "biller"; +}; + +export type TeamUserDeleted = { + team_id: string; + team_user_deleted: boolean; +}; diff --git a/src/types/teams.ts b/src/types/teams.ts new file mode 100644 index 00000000..b0874111 --- /dev/null +++ b/src/types/teams.ts @@ -0,0 +1,3 @@ +import type { TeamOnly, PaginationParams } from "./common_get_params.js"; + +export type TeamWithPagination = TeamOnly & PaginationParams; diff --git a/src/types/translation_data.ts b/src/types/translation_data.ts deleted file mode 100644 index 65059d89..00000000 --- a/src/types/translation_data.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Keyable } from "../interfaces/keyable.js"; - -export type TranslationData = { - language_iso?: string; - translation?: string | Keyable; - is_reviewed?: boolean; - is_unverified?: boolean; - custom_translation_status_ids?: string[] | number[]; -}; diff --git a/src/types/translation_statuses.ts b/src/types/translation_statuses.ts new file mode 100644 index 00000000..b6f2b13b --- /dev/null +++ b/src/types/translation_statuses.ts @@ -0,0 +1,19 @@ +export type CreateTranslationStatusParams = { + title: string; + color: string; +}; + +export type UpdateTranslationStatusParams = { + title?: string; + color?: string; +}; + +export type TranslationStatusDeleted = { + project_id: string; + custom_translation_status_deleted: boolean; + branch?: string; +}; + +export type TranslationStatusColors = { + colors: string[]; +}; diff --git a/src/types/translations.ts b/src/types/translations.ts new file mode 100644 index 00000000..758dbed2 --- /dev/null +++ b/src/types/translations.ts @@ -0,0 +1,34 @@ +import { Keyable } from "../interfaces/keyable.js"; +import type { + ProjectWithPagination, + ProjectOnly, +} from "./common_get_params.js"; + +export type TranslationData = { + language_iso?: string; + translation?: string | Keyable; + is_reviewed?: boolean; + is_unverified?: boolean; + custom_translation_status_ids?: string[] | number[]; +}; + +export type UpdateTranslationParams = { + translation: string; + is_unverified?: boolean; + is_reviewed?: boolean; + custom_translation_status_ids?: string[] | number[]; +}; + +export type ListTranslationParams = ProjectWithPagination & { + disable_references?: number | string; + filter_lang_id?: number | string; + filter_is_reviewed?: number | string; + filter_unverified?: number | string; + filter_untranslated?: number | string; + filter_qa_issues?: string; + filter_active_task_id?: number | string; +}; + +export type GetTranslationParams = ProjectOnly & { + disable_references?: number | string; +}; diff --git a/src/types/update_key_data.ts b/src/types/update_key_data.ts deleted file mode 100644 index 5b793770..00000000 --- a/src/types/update_key_data.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { CreateKeyData } from "./create_key_data.js"; -import { Filenames as Keynames } from "../types/filenames.js"; -import { SupportedPlatforms } from "../types/supported_platforms.js"; - -export type UpdateKeyData = Omit & { - key_name?: string | Keynames; - merge_tags?: boolean; - platforms?: SupportedPlatforms[]; -}; diff --git a/src/types/update_key_data_with_id.ts b/src/types/update_key_data_with_id.ts deleted file mode 100644 index 9c2953e5..00000000 --- a/src/types/update_key_data_with_id.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { UpdateKeyData } from "./update_key_data.js"; - -export type UpdateKeyDataWithId = UpdateKeyData & { - key_id: string | number; -}; diff --git a/src/types/update_language_params.ts b/src/types/update_language_params.ts deleted file mode 100644 index 8cb69bbf..00000000 --- a/src/types/update_language_params.ts +++ /dev/null @@ -1,5 +0,0 @@ -export type UpdateLanguageParams = { - lang_iso?: string; - lang_name?: string; - plural_forms?: string[]; -}; diff --git a/src/types/update_project_params.ts b/src/types/update_project_params.ts deleted file mode 100644 index e1d718fe..00000000 --- a/src/types/update_project_params.ts +++ /dev/null @@ -1,4 +0,0 @@ -export type UpdateProjectParams = { - name: string; - description?: string; -}; diff --git a/src/types/update_screenshot_params.ts b/src/types/update_screenshot_params.ts deleted file mode 100644 index 510b4b46..00000000 --- a/src/types/update_screenshot_params.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { CreateScreenshotParams } from "./create_screenshot_params.js"; - -export type UpdateScreenshotParams = Omit< - CreateScreenshotParams, - "data" | "ocr" ->; diff --git a/src/types/update_task_params.ts b/src/types/update_task_params.ts deleted file mode 100644 index 08348fbc..00000000 --- a/src/types/update_task_params.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { TaskLanguage } from "./task_language.js"; -import { CreateTaskParams } from "./create_task_params.js"; - -export type UpdateTaskParams = Omit< - CreateTaskParams, - | "title" - | "keys" - | "source_language_iso" - | "task_type" - | "parent_task_id" - | "custom_translation_status_ids" -> & { - title?: string; - close_task?: boolean; - languages?: Array< - TaskLanguage & { - close_language?: boolean; - } - >; -}; diff --git a/src/types/update_translation_params.ts b/src/types/update_translation_params.ts deleted file mode 100644 index 36f32eb4..00000000 --- a/src/types/update_translation_params.ts +++ /dev/null @@ -1,6 +0,0 @@ -export type UpdateTranslationParams = { - translation: string; - is_unverified?: boolean; - is_reviewed?: boolean; - custom_translation_status_ids?: string[] | number[]; -}; diff --git a/src/types/update_translation_status_params.ts b/src/types/update_translation_status_params.ts deleted file mode 100644 index 3f3dc2fd..00000000 --- a/src/types/update_translation_status_params.ts +++ /dev/null @@ -1,4 +0,0 @@ -export type UpdateTranslationStatusParams = { - title?: string; - color?: string; -}; diff --git a/src/types/update_webhook_params.ts b/src/types/update_webhook_params.ts deleted file mode 100644 index 91032a53..00000000 --- a/src/types/update_webhook_params.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { CreateWebhookParams } from "./create_webhook_params.js"; - -export type UpdateWebhookParams = Omit< - CreateWebhookParams, - "url" | "events" -> & { - url?: string; - events?: string[]; -}; diff --git a/src/types/user_group_params.ts b/src/types/user_groups.ts similarity index 79% rename from src/types/user_group_params.ts rename to src/types/user_groups.ts index a3f4672f..48b4cdac 100644 --- a/src/types/user_group_params.ts +++ b/src/types/user_groups.ts @@ -3,7 +3,7 @@ type GroupLanguages = { contributable: string[]; }; -type AdminRights = +export type AdminRights = | "upload" | "activity" | "download" @@ -24,3 +24,8 @@ export type UserGroupParams = { admin_rights?: AdminRights[]; languages?: GroupLanguages; }; + +export type UserGroupDeleted = { + team_id: string; + group_deleted: boolean; +}; diff --git a/src/types/webhook_event_lang_map.ts b/src/types/webhook_event_lang_map.ts deleted file mode 100644 index 232b76ac..00000000 --- a/src/types/webhook_event_lang_map.ts +++ /dev/null @@ -1,4 +0,0 @@ -export type WebhookEventLangMap = { - event?: string; - lang_iso_codes?: string[]; -}; diff --git a/src/types/webhook_events/project_exported.ts b/src/types/webhook_events/project_exported.ts index 5ddc40c2..ceb485e7 100644 --- a/src/types/webhook_events/project_exported.ts +++ b/src/types/webhook_events/project_exported.ts @@ -1,4 +1,4 @@ -import { SupportedPlatforms } from "../supported_platforms.js"; +import type { SupportedPlatforms } from "../supported_platforms.js"; export type WebhookProjectExported = { event: "project.exported"; diff --git a/src/types/webhook_events/project_key_added.ts b/src/types/webhook_events/project_key_added.ts index 1d71cc14..883745a7 100644 --- a/src/types/webhook_events/project_key_added.ts +++ b/src/types/webhook_events/project_key_added.ts @@ -1,4 +1,4 @@ -import { Filenames } from "../filenames.js"; +import type { Filenames } from "../filenames.js"; export type WebhookProjectKeyAdded = { event: "project.key.added"; diff --git a/src/types/webhook_events/project_key_comment_added.ts b/src/types/webhook_events/project_key_comment_added.ts index 4ca099fe..5b4f6e15 100644 --- a/src/types/webhook_events/project_key_comment_added.ts +++ b/src/types/webhook_events/project_key_comment_added.ts @@ -1,4 +1,4 @@ -import { Filenames } from "../filenames.js"; +import type { Filenames } from "../filenames.js"; export type WebhookProjectKeyCommentAdded = { event: "project.key.comment.added"; diff --git a/src/types/webhook_events/project_key_modified.ts b/src/types/webhook_events/project_key_modified.ts index 0cea02e3..3f9d3f9c 100644 --- a/src/types/webhook_events/project_key_modified.ts +++ b/src/types/webhook_events/project_key_modified.ts @@ -1,4 +1,4 @@ -import { Filenames } from "../filenames.js"; +import type { Filenames } from "../filenames.js"; export type WebhookProjectKeyModified = { event: "project.key.modified"; diff --git a/src/types/webhook_events/project_keys_added.ts b/src/types/webhook_events/project_keys_added.ts index e7885b82..6f21cb6f 100644 --- a/src/types/webhook_events/project_keys_added.ts +++ b/src/types/webhook_events/project_keys_added.ts @@ -1,4 +1,4 @@ -import { Filenames } from "../filenames.js"; +import type { Filenames } from "../filenames.js"; export type WebhookProjectKeysAdded = { event: "project.keys.added"; diff --git a/src/types/webhook_events/project_keys_deleted.ts b/src/types/webhook_events/project_keys_deleted.ts index 9e1e45d1..cbcc8f41 100644 --- a/src/types/webhook_events/project_keys_deleted.ts +++ b/src/types/webhook_events/project_keys_deleted.ts @@ -1,4 +1,4 @@ -import { Filenames } from "../filenames.js"; +import type { Filenames } from "../filenames.js"; export type WebhookProjectKeysDeleted = { event: "project.keys.deleted"; diff --git a/src/types/webhook_events/project_keys_modified.ts b/src/types/webhook_events/project_keys_modified.ts index 33d5a234..eeb55d59 100644 --- a/src/types/webhook_events/project_keys_modified.ts +++ b/src/types/webhook_events/project_keys_modified.ts @@ -1,4 +1,4 @@ -import { Filenames } from "../filenames.js"; +import type { Filenames } from "../filenames.js"; export type WebhookProjectKeysModified = { event: "project.keys.modified"; diff --git a/src/types/webhook_events/project_translation_proofread.ts b/src/types/webhook_events/project_translation_proofread.ts index 30f93004..95686510 100644 --- a/src/types/webhook_events/project_translation_proofread.ts +++ b/src/types/webhook_events/project_translation_proofread.ts @@ -1,4 +1,4 @@ -import { Filenames } from "../filenames.js"; +import type { Filenames } from "../filenames.js"; export type WebhookProjectTranslationProofread = { event: "project.translation.proofread"; diff --git a/src/types/webhook_events/project_translation_updated.ts b/src/types/webhook_events/project_translation_updated.ts index 33eb9ad0..cecab23c 100644 --- a/src/types/webhook_events/project_translation_updated.ts +++ b/src/types/webhook_events/project_translation_updated.ts @@ -1,4 +1,4 @@ -import { Filenames } from "../filenames.js"; +import type { Filenames } from "../filenames.js"; export type WebhookProjectTranslationUpdated = { event: "project.translation.updated"; diff --git a/src/types/webhooks.ts b/src/types/webhooks.ts new file mode 100644 index 00000000..c8ded579 --- /dev/null +++ b/src/types/webhooks.ts @@ -0,0 +1,29 @@ +export type WebhookEventLangMap = { + event?: string; + lang_iso_codes?: string[]; +}; + +export type CreateWebhookParams = { + url: string; + branch?: string; + events: string[]; + event_lang_map?: WebhookEventLangMap[]; +}; + +export type UpdateWebhookParams = Omit< + CreateWebhookParams, + "url" | "events" +> & { + url?: string; + events?: string[]; +}; + +export type WebhookDeleted = { + project_id: string; + webhook_deleted: boolean; +}; + +export type WebhookRegenerated = { + project_id: string; + secret: string; +}; diff --git a/test/ota/ota_sdk_tokens.spec.ts b/test/ota/ota_sdk_tokens.spec.ts index d5ca5844..d996c766 100644 --- a/test/ota/ota_sdk_tokens.spec.ts +++ b/test/ota/ota_sdk_tokens.spec.ts @@ -1,5 +1,5 @@ import { expect, it, describe, LokaliseApiOta, Stub } from "../setup.js"; -import { OtaApiError } from "../../src/models/ota_api_error.js"; +import { OtaApiError } from "../../src/models/ota/ota_api_error.js"; describe("OtaSdkTokens", function () { const token = process.env.API_JWT;