databay-cli 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- databay/__init__.py +5 -0
- databay/__main__.py +7 -0
- databay/agent_skill.py +184 -0
- databay/api.py +626 -0
- databay/cli/__init__.py +0 -0
- databay/cli/auth.py +377 -0
- databay/cli/build.py +89 -0
- databay/cli/commands/__init__.py +0 -0
- databay/cli/commands/alerting_webhook.py +19 -0
- databay/cli/commands/alerting_webhook_tag.py +14 -0
- databay/cli/commands/alerting_webhook_type.py +14 -0
- databay/cli/commands/alerting_webhook_undelivered.py +15 -0
- databay/cli/commands/announcement.py +17 -0
- databay/cli/commands/api_key.py +18 -0
- databay/cli/commands/api_key_project.py +16 -0
- databay/cli/commands/backfill_reason_code.py +14 -0
- databay/cli/commands/backfill_run.py +17 -0
- databay/cli/commands/canvas.py +16 -0
- databay/cli/commands/canvas_graph.py +15 -0
- databay/cli/commands/canvas_table_check.py +15 -0
- databay/cli/commands/dashboards.py +21 -0
- databay/cli/commands/dashboards_card.py +20 -0
- databay/cli/commands/dashboards_dataset.py +14 -0
- databay/cli/commands/dashboards_folder.py +16 -0
- databay/cli/commands/dashboards_home.py +17 -0
- databay/cli/commands/dashboards_placement.py +16 -0
- databay/cli/commands/db.py +19 -0
- databay/cli/commands/db_column.py +14 -0
- databay/cli/commands/docs_article.py +16 -0
- databay/cli/commands/dq_result.py +14 -0
- databay/cli/commands/dq_rule.py +16 -0
- databay/cli/commands/feature.py +14 -0
- databay/cli/commands/google_ads_source.py +14 -0
- databay/cli/commands/google_analytics_source.py +14 -0
- databay/cli/commands/instagram_account.py +14 -0
- databay/cli/commands/instagram_source.py +14 -0
- databay/cli/commands/linkedin_account.py +14 -0
- databay/cli/commands/linkedin_source.py +14 -0
- databay/cli/commands/me.py +14 -0
- databay/cli/commands/meta_ads_source.py +14 -0
- databay/cli/commands/metric_models.py +26 -0
- databay/cli/commands/metrics.py +14 -0
- databay/cli/commands/models.py +16 -0
- databay/cli/commands/nlq.py +15 -0
- databay/cli/commands/notebook_credential.py +16 -0
- databay/cli/commands/org.py +14 -0
- databay/cli/commands/org_member.py +17 -0
- databay/cli/commands/org_offboarding.py +14 -0
- databay/cli/commands/pipe.py +26 -0
- databay/cli/commands/pipe_backfill_run.py +14 -0
- databay/cli/commands/pipe_config_option.py +14 -0
- databay/cli/commands/pipe_destination.py +16 -0
- databay/cli/commands/pipe_leftover.py +16 -0
- databay/cli/commands/pipe_sink_type.py +14 -0
- databay/cli/commands/pipe_source_type.py +14 -0
- databay/cli/commands/pipe_status_bucket.py +14 -0
- databay/cli/commands/pipe_stuck_delete.py +14 -0
- databay/cli/commands/plan.py +14 -0
- databay/cli/commands/project.py +21 -0
- databay/cli/commands/project_budget.py +15 -0
- databay/cli/commands/project_member.py +18 -0
- databay/cli/commands/project_privilege.py +16 -0
- databay/cli/commands/project_share.py +16 -0
- databay/cli/commands/provision.py +14 -0
- databay/cli/commands/provisioning.py +14 -0
- databay/cli/commands/registry.py +14 -0
- databay/cli/commands/resource_home.py +14 -0
- databay/cli/commands/schema_change.py +18 -0
- databay/cli/commands/schema_history.py +17 -0
- databay/cli/commands/schema_version.py +16 -0
- databay/cli/commands/shopify_store.py +14 -0
- databay/cli/commands/sink_data_type.py +14 -0
- databay/cli/commands/source.py +24 -0
- databay/cli/commands/source_catalog.py +15 -0
- databay/cli/commands/source_check_run.py +17 -0
- databay/cli/commands/source_hidden_type.py +14 -0
- databay/cli/commands/source_name.py +14 -0
- databay/cli/commands/source_pipe.py +14 -0
- databay/cli/commands/source_publication.py +16 -0
- databay/cli/commands/source_readiness_override.py +15 -0
- databay/cli/commands/source_setup_choice.py +16 -0
- databay/cli/commands/source_stream.py +15 -0
- databay/cli/commands/source_table.py +14 -0
- databay/cli/commands/ssbi_job.py +18 -0
- databay/cli/commands/transform_type.py +14 -0
- databay/cli/commands/usage.py +14 -0
- databay/cli/commands/warehouse.py +21 -0
- databay/cli/commands/warehouse_access_assignment.py +16 -0
- databay/cli/commands/warehouse_access_role.py +22 -0
- databay/cli/commands/warehouse_access_settings.py +17 -0
- databay/cli/commands/warehouse_login.py +20 -0
- databay/cli/commands/warehouse_principal.py +17 -0
- databay/cli/commands/warehouse_service_account.py +17 -0
- databay/cli/commands/warehouse_service_account_credential.py +18 -0
- databay/cli/common.py +93 -0
- databay/cli/console.py +121 -0
- databay/cli/flags.py +183 -0
- databay/cli/handwritten.py +22 -0
- databay/cli/main.py +198 -0
- databay/cli/metrics.py +171 -0
- databay/cli/org.py +193 -0
- databay/cli/output.py +134 -0
- databay/cli/pipe_wait.py +357 -0
- databay/cli/profile.py +230 -0
- databay/cli/runner.py +432 -0
- databay/cli/skill.py +64 -0
- databay/cli/sql.py +84 -0
- databay/compat.py +161 -0
- databay/credentials.py +217 -0
- databay/error_catalog.py +226 -0
- databay/error_codes.py +3265 -0
- databay/errors.py +222 -0
- databay/feature_header.py +40 -0
- databay/invoke.py +225 -0
- databay/locks.py +41 -0
- databay/login_flow.py +245 -0
- databay/model_base.py +40 -0
- databay/models/__init__.py +0 -0
- databay/models/alerting_webhook.py +46 -0
- databay/models/alerting_webhook_tag.py +11 -0
- databay/models/alerting_webhook_type.py +11 -0
- databay/models/alerting_webhook_undelivered.py +23 -0
- databay/models/announcement.py +37 -0
- databay/models/api_key.py +81 -0
- databay/models/api_key_project.py +29 -0
- databay/models/backfill_reason_code.py +11 -0
- databay/models/backfill_run.py +41 -0
- databay/models/canvas.py +68 -0
- databay/models/canvas_graph.py +86 -0
- databay/models/canvas_table_check.py +181 -0
- databay/models/dashboards.py +79 -0
- databay/models/dashboards_card.py +37 -0
- databay/models/dashboards_dataset.py +27 -0
- databay/models/dashboards_folder.py +18 -0
- databay/models/dashboards_home.py +28 -0
- databay/models/db.py +34 -0
- databay/models/db_column.py +11 -0
- databay/models/docs_article.py +59 -0
- databay/models/dq_result.py +27 -0
- databay/models/dq_rule.py +43 -0
- databay/models/feature.py +15 -0
- databay/models/google_ads_source.py +11 -0
- databay/models/google_analytics_source.py +11 -0
- databay/models/instagram_source.py +11 -0
- databay/models/linkedin_source.py +11 -0
- databay/models/me.py +71 -0
- databay/models/meta_ads_source.py +11 -0
- databay/models/metric_models.py +274 -0
- databay/models/metrics.py +158 -0
- databay/models/models.py +73 -0
- databay/models/nlq.py +92 -0
- databay/models/notebook_credential.py +51 -0
- databay/models/org.py +44 -0
- databay/models/org_member.py +123 -0
- databay/models/org_offboarding.py +36 -0
- databay/models/pipe.py +340 -0
- databay/models/pipe_config_option.py +25 -0
- databay/models/pipe_destination.py +128 -0
- databay/models/pipe_leftover.py +51 -0
- databay/models/pipe_sink_type.py +11 -0
- databay/models/pipe_source_type.py +11 -0
- databay/models/pipe_status_bucket.py +13 -0
- databay/models/pipe_stuck_delete.py +25 -0
- databay/models/plan.py +37 -0
- databay/models/project.py +154 -0
- databay/models/project_budget.py +22 -0
- databay/models/project_member.py +67 -0
- databay/models/project_privilege.py +21 -0
- databay/models/project_share.py +76 -0
- databay/models/provision.py +12 -0
- databay/models/provisioning.py +20 -0
- databay/models/registry.py +18 -0
- databay/models/resource_home.py +35 -0
- databay/models/schema_change.py +96 -0
- databay/models/schema_history.py +32 -0
- databay/models/schema_version.py +23 -0
- databay/models/shared.py +875 -0
- databay/models/shopify_store.py +19 -0
- databay/models/sink_data_type.py +11 -0
- databay/models/source.py +263 -0
- databay/models/source_catalog.py +82 -0
- databay/models/source_check_run.py +63 -0
- databay/models/source_hidden_type.py +13 -0
- databay/models/source_name.py +18 -0
- databay/models/source_pipe.py +16 -0
- databay/models/source_publication.py +30 -0
- databay/models/source_readiness_override.py +13 -0
- databay/models/source_setup_choice.py +33 -0
- databay/models/source_stream.py +65 -0
- databay/models/source_table.py +27 -0
- databay/models/sql.py +31 -0
- databay/models/ssbi_job.py +97 -0
- databay/models/transform_type.py +40 -0
- databay/models/usage.py +112 -0
- databay/models/warehouse.py +38 -0
- databay/models/warehouse_access_assignment.py +70 -0
- databay/models/warehouse_access_role.py +148 -0
- databay/models/warehouse_access_settings.py +35 -0
- databay/models/warehouse_login.py +20 -0
- databay/models/warehouse_principal.py +49 -0
- databay/models/warehouse_service_account.py +35 -0
- databay/models/warehouse_service_account_credential.py +11 -0
- databay/oidc.py +205 -0
- databay/operation.py +191 -0
- databay/operations/__init__.py +0 -0
- databay/operations/alerting_webhook.py +317 -0
- databay/operations/alerting_webhook_tag.py +35 -0
- databay/operations/alerting_webhook_type.py +35 -0
- databay/operations/alerting_webhook_undelivered.py +74 -0
- databay/operations/announcement.py +135 -0
- databay/operations/api_key.py +198 -0
- databay/operations/api_key_project.py +130 -0
- databay/operations/backfill_reason_code.py +35 -0
- databay/operations/backfill_run.py +245 -0
- databay/operations/canvas.py +136 -0
- databay/operations/canvas_graph.py +102 -0
- databay/operations/canvas_table_check.py +101 -0
- databay/operations/dashboards.py +441 -0
- databay/operations/dashboards_card.py +406 -0
- databay/operations/dashboards_dataset.py +50 -0
- databay/operations/dashboards_folder.py +146 -0
- databay/operations/dashboards_home.py +176 -0
- databay/operations/dashboards_placement.py +152 -0
- databay/operations/db.py +337 -0
- databay/operations/db_column.py +57 -0
- databay/operations/docs_article.py +101 -0
- databay/operations/dq_result.py +43 -0
- databay/operations/dq_rule.py +155 -0
- databay/operations/feature.py +35 -0
- databay/operations/google_ads_source.py +40 -0
- databay/operations/google_analytics_source.py +40 -0
- databay/operations/instagram_account.py +47 -0
- databay/operations/instagram_source.py +40 -0
- databay/operations/linkedin_account.py +47 -0
- databay/operations/linkedin_source.py +40 -0
- databay/operations/me.py +57 -0
- databay/operations/meta_ads_source.py +40 -0
- databay/operations/metric_models.py +612 -0
- databay/operations/metrics.py +218 -0
- databay/operations/models.py +123 -0
- databay/operations/nlq.py +100 -0
- databay/operations/notebook_credential.py +95 -0
- databay/operations/org.py +79 -0
- databay/operations/org_member.py +192 -0
- databay/operations/org_offboarding.py +43 -0
- databay/operations/pipe.py +882 -0
- databay/operations/pipe_backfill_run.py +72 -0
- databay/operations/pipe_config_option.py +50 -0
- databay/operations/pipe_destination.py +178 -0
- databay/operations/pipe_leftover.py +110 -0
- databay/operations/pipe_sink_type.py +35 -0
- databay/operations/pipe_source_type.py +35 -0
- databay/operations/pipe_status_bucket.py +35 -0
- databay/operations/pipe_stuck_delete.py +52 -0
- databay/operations/plan.py +35 -0
- databay/operations/project.py +346 -0
- databay/operations/project_budget.py +135 -0
- databay/operations/project_member.py +226 -0
- databay/operations/project_privilege.py +143 -0
- databay/operations/project_share.py +160 -0
- databay/operations/provision.py +35 -0
- databay/operations/provisioning.py +35 -0
- databay/operations/registry.py +35 -0
- databay/operations/resource_home.py +80 -0
- databay/operations/schema_change.py +222 -0
- databay/operations/schema_history.py +136 -0
- databay/operations/schema_version.py +115 -0
- databay/operations/shopify_store.py +40 -0
- databay/operations/sink_data_type.py +43 -0
- databay/operations/source.py +1207 -0
- databay/operations/source_catalog.py +135 -0
- databay/operations/source_check_run.py +242 -0
- databay/operations/source_hidden_type.py +59 -0
- databay/operations/source_name.py +69 -0
- databay/operations/source_pipe.py +57 -0
- databay/operations/source_publication.py +139 -0
- databay/operations/source_readiness_override.py +96 -0
- databay/operations/source_setup_choice.py +161 -0
- databay/operations/source_stream.py +99 -0
- databay/operations/source_table.py +59 -0
- databay/operations/sql.py +54 -0
- databay/operations/ssbi_job.py +242 -0
- databay/operations/transform_type.py +35 -0
- databay/operations/usage.py +35 -0
- databay/operations/warehouse.py +343 -0
- databay/operations/warehouse_access_assignment.py +179 -0
- databay/operations/warehouse_access_role.py +473 -0
- databay/operations/warehouse_access_settings.py +172 -0
- databay/operations/warehouse_login.py +308 -0
- databay/operations/warehouse_principal.py +174 -0
- databay/operations/warehouse_service_account.py +206 -0
- databay/operations/warehouse_service_account_credential.py +285 -0
- databay/paths.py +32 -0
- databay/platform_check.py +20 -0
- databay/profiles.py +181 -0
- databay/redact.py +22 -0
- databay/reference.py +218 -0
- databay/resource.py +167 -0
- databay/resources/__init__.py +0 -0
- databay/resources/alerting_webhook.py +84 -0
- databay/resources/alerting_webhook_tag.py +21 -0
- databay/resources/alerting_webhook_type.py +21 -0
- databay/resources/alerting_webhook_undelivered.py +35 -0
- databay/resources/announcement.py +45 -0
- databay/resources/api_key.py +56 -0
- databay/resources/api_key_project.py +47 -0
- databay/resources/backfill_reason_code.py +21 -0
- databay/resources/backfill_run.py +78 -0
- databay/resources/canvas.py +43 -0
- databay/resources/canvas_graph.py +38 -0
- databay/resources/canvas_table_check.py +38 -0
- databay/resources/dashboards.py +105 -0
- databay/resources/dashboards_card.py +97 -0
- databay/resources/dashboards_dataset.py +27 -0
- databay/resources/dashboards_folder.py +47 -0
- databay/resources/dashboards_home.py +59 -0
- databay/resources/dashboards_placement.py +47 -0
- databay/resources/db.py +87 -0
- databay/resources/db_column.py +28 -0
- databay/resources/docs_article.py +37 -0
- databay/resources/dq_result.py +25 -0
- databay/resources/dq_rule.py +48 -0
- databay/resources/feature.py +21 -0
- databay/resources/google_ads_source.py +25 -0
- databay/resources/google_analytics_source.py +25 -0
- databay/resources/instagram_account.py +27 -0
- databay/resources/instagram_source.py +25 -0
- databay/resources/linkedin_account.py +27 -0
- databay/resources/linkedin_source.py +25 -0
- databay/resources/me.py +27 -0
- databay/resources/meta_ads_source.py +25 -0
- databay/resources/metric_models.py +154 -0
- databay/resources/metrics.py +57 -0
- databay/resources/models.py +42 -0
- databay/resources/nlq.py +34 -0
- databay/resources/notebook_credential.py +41 -0
- databay/resources/org.py +29 -0
- databay/resources/org_member.py +53 -0
- databay/resources/org_offboarding.py +25 -0
- databay/resources/pipe.py +208 -0
- databay/resources/pipe_backfill_run.py +28 -0
- databay/resources/pipe_config_option.py +26 -0
- databay/resources/pipe_destination.py +49 -0
- databay/resources/pipe_leftover.py +42 -0
- databay/resources/pipe_sink_type.py +21 -0
- databay/resources/pipe_source_type.py +21 -0
- databay/resources/pipe_status_bucket.py +21 -0
- databay/resources/pipe_stuck_delete.py +27 -0
- databay/resources/plan.py +21 -0
- databay/resources/project.py +92 -0
- databay/resources/project_budget.py +38 -0
- databay/resources/project_member.py +68 -0
- databay/resources/project_privilege.py +48 -0
- databay/resources/project_share.py +47 -0
- databay/resources/provision.py +21 -0
- databay/resources/provisioning.py +21 -0
- databay/resources/registry.py +21 -0
- databay/resources/resource_home.py +29 -0
- databay/resources/schema_change.py +62 -0
- databay/resources/schema_history.py +52 -0
- databay/resources/schema_version.py +43 -0
- databay/resources/shopify_store.py +25 -0
- databay/resources/sink_data_type.py +25 -0
- databay/resources/source.py +132 -0
- databay/resources/source_catalog.py +34 -0
- databay/resources/source_check_run.py +67 -0
- databay/resources/source_hidden_type.py +25 -0
- databay/resources/source_name.py +27 -0
- databay/resources/source_pipe.py +28 -0
- databay/resources/source_publication.py +47 -0
- databay/resources/source_readiness_override.py +37 -0
- databay/resources/source_setup_choice.py +50 -0
- databay/resources/source_stream.py +38 -0
- databay/resources/source_table.py +27 -0
- databay/resources/sql.py +27 -0
- databay/resources/ssbi_job.py +69 -0
- databay/resources/transform_type.py +21 -0
- databay/resources/usage.py +21 -0
- databay/resources/warehouse.py +136 -0
- databay/resources/warehouse_access_assignment.py +51 -0
- databay/resources/warehouse_access_role.py +118 -0
- databay/resources/warehouse_access_settings.py +56 -0
- databay/resources/warehouse_login.py +81 -0
- databay/resources/warehouse_principal.py +51 -0
- databay/resources/warehouse_service_account.py +61 -0
- databay/resources/warehouse_service_account_credential.py +78 -0
- databay/sdk.py +77 -0
- databay/settings.py +90 -0
- databay/skill/SKILL.md +357 -0
- databay/skill/references/commands.md +7025 -0
- databay/skill/references/errors.md +727 -0
- databay/spec.py +362 -0
- databay/stored_token.py +134 -0
- databay/tokens.py +108 -0
- databay/transport.py +357 -0
- databay/update_check.py +151 -0
- databay/version.py +6 -0
- databay/waits.py +330 -0
- databay_cli-0.1.0.dist-info/METADATA +42 -0
- databay_cli-0.1.0.dist-info/RECORD +403 -0
- databay_cli-0.1.0.dist-info/WHEEL +4 -0
- databay_cli-0.1.0.dist-info/entry_points.txt +2 -0
- databay_cli-0.1.0.dist-info/licenses/LICENSE +202 -0
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
"""The ``api-key`` operations.
|
|
2
|
+
|
|
3
|
+
Generated by python/tools/gen_client.py from contract/core.json; do not edit.
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
from databay.operation import Body, Operation, Param, Response
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
API_KEY_CREATE = Operation(
|
|
10
|
+
operation_id='api_key_create',
|
|
11
|
+
noun='api-key',
|
|
12
|
+
verb='create',
|
|
13
|
+
method='post',
|
|
14
|
+
path='/api/auth/api-keys',
|
|
15
|
+
summary='Create Key',
|
|
16
|
+
description='Create a key for CI or an agent; its secret is shown once, in this answer.',
|
|
17
|
+
project=None,
|
|
18
|
+
destructive=False,
|
|
19
|
+
idempotent=True,
|
|
20
|
+
since='1.0',
|
|
21
|
+
params=(),
|
|
22
|
+
body=Body(
|
|
23
|
+
schema='ApiKeyCreateRequest',
|
|
24
|
+
fields=(
|
|
25
|
+
Param(
|
|
26
|
+
name='name',
|
|
27
|
+
location='body',
|
|
28
|
+
kind='string',
|
|
29
|
+
required=True,
|
|
30
|
+
description='What the key is for, e.g. `ci-nightly`.',
|
|
31
|
+
),
|
|
32
|
+
Param(
|
|
33
|
+
name='project_ids',
|
|
34
|
+
location='body',
|
|
35
|
+
kind='list',
|
|
36
|
+
required=True,
|
|
37
|
+
description='The projects the key may reach; each must be one you administer.',
|
|
38
|
+
item_kind='string',
|
|
39
|
+
),
|
|
40
|
+
Param(
|
|
41
|
+
name='role',
|
|
42
|
+
location='body',
|
|
43
|
+
kind='string',
|
|
44
|
+
required=True,
|
|
45
|
+
description='The realm role the key acts with; it gets the same role in its projects.',
|
|
46
|
+
choices=(
|
|
47
|
+
'reader',
|
|
48
|
+
'editor',
|
|
49
|
+
),
|
|
50
|
+
),
|
|
51
|
+
),
|
|
52
|
+
),
|
|
53
|
+
response=Response(
|
|
54
|
+
kind='json',
|
|
55
|
+
model='api_key:ApiKeyCreated',
|
|
56
|
+
shape='object',
|
|
57
|
+
),
|
|
58
|
+
examples=(
|
|
59
|
+
'databay api-key create --name ci-nightly --role reader --project-ids <project_id>',
|
|
60
|
+
),
|
|
61
|
+
)
|
|
62
|
+
|
|
63
|
+
API_KEY_GET = Operation(
|
|
64
|
+
operation_id='api_key_get',
|
|
65
|
+
noun='api-key',
|
|
66
|
+
verb='get',
|
|
67
|
+
method='get',
|
|
68
|
+
path='/api/auth/api-keys/{key_id}',
|
|
69
|
+
summary='Get Key',
|
|
70
|
+
description='',
|
|
71
|
+
project=None,
|
|
72
|
+
destructive=False,
|
|
73
|
+
idempotent=False,
|
|
74
|
+
since='1.0',
|
|
75
|
+
params=(
|
|
76
|
+
Param(
|
|
77
|
+
name='key_id',
|
|
78
|
+
location='path',
|
|
79
|
+
kind='string',
|
|
80
|
+
required=True,
|
|
81
|
+
description='Key Id',
|
|
82
|
+
),
|
|
83
|
+
),
|
|
84
|
+
body=None,
|
|
85
|
+
response=Response(
|
|
86
|
+
kind='json',
|
|
87
|
+
model='api_key:ApiKeyOut',
|
|
88
|
+
shape='object',
|
|
89
|
+
),
|
|
90
|
+
examples=(
|
|
91
|
+
'databay api-key get <key_id>',
|
|
92
|
+
),
|
|
93
|
+
)
|
|
94
|
+
|
|
95
|
+
API_KEY_LIST = Operation(
|
|
96
|
+
operation_id='api_key_list',
|
|
97
|
+
noun='api-key',
|
|
98
|
+
verb='list',
|
|
99
|
+
method='get',
|
|
100
|
+
path='/api/auth/api-keys',
|
|
101
|
+
summary='List Keys',
|
|
102
|
+
description='Every key of the organization, revoked ones included; never a secret.',
|
|
103
|
+
project=None,
|
|
104
|
+
destructive=False,
|
|
105
|
+
idempotent=False,
|
|
106
|
+
since='1.0',
|
|
107
|
+
params=(),
|
|
108
|
+
body=None,
|
|
109
|
+
response=Response(
|
|
110
|
+
kind='json',
|
|
111
|
+
model='api_key:ApiKeyList',
|
|
112
|
+
shape='object',
|
|
113
|
+
rows='/keys',
|
|
114
|
+
),
|
|
115
|
+
examples=(
|
|
116
|
+
'databay api-key list',
|
|
117
|
+
),
|
|
118
|
+
columns=(
|
|
119
|
+
'id',
|
|
120
|
+
'name',
|
|
121
|
+
'role',
|
|
122
|
+
'status',
|
|
123
|
+
'project_ids',
|
|
124
|
+
'created_at',
|
|
125
|
+
),
|
|
126
|
+
)
|
|
127
|
+
|
|
128
|
+
API_KEY_REVOKE = Operation(
|
|
129
|
+
operation_id='api_key_revoke',
|
|
130
|
+
noun='api-key',
|
|
131
|
+
verb='revoke',
|
|
132
|
+
method='delete',
|
|
133
|
+
path='/api/auth/api-keys/{key_id}',
|
|
134
|
+
summary='Revoke Key',
|
|
135
|
+
description='Revoke the key: its tokens stop working and it leaves every project.',
|
|
136
|
+
project=None,
|
|
137
|
+
destructive=True,
|
|
138
|
+
idempotent=False,
|
|
139
|
+
since='1.0',
|
|
140
|
+
params=(
|
|
141
|
+
Param(
|
|
142
|
+
name='key_id',
|
|
143
|
+
location='path',
|
|
144
|
+
kind='string',
|
|
145
|
+
required=True,
|
|
146
|
+
description='Key Id',
|
|
147
|
+
),
|
|
148
|
+
),
|
|
149
|
+
body=None,
|
|
150
|
+
response=Response(
|
|
151
|
+
kind='json',
|
|
152
|
+
model='api_key:ApiKeyOut',
|
|
153
|
+
shape='object',
|
|
154
|
+
),
|
|
155
|
+
examples=(
|
|
156
|
+
'databay api-key revoke <key_id> --yes',
|
|
157
|
+
),
|
|
158
|
+
)
|
|
159
|
+
|
|
160
|
+
API_KEY_ROTATE = Operation(
|
|
161
|
+
operation_id='api_key_rotate',
|
|
162
|
+
noun='api-key',
|
|
163
|
+
verb='rotate',
|
|
164
|
+
method='post',
|
|
165
|
+
path='/api/auth/api-keys/{key_id}/rotate',
|
|
166
|
+
summary='Rotate Key',
|
|
167
|
+
description="Replace the key's secret; the old secret and its tokens stop working at once.",
|
|
168
|
+
project=None,
|
|
169
|
+
destructive=True,
|
|
170
|
+
idempotent=False,
|
|
171
|
+
since='1.0',
|
|
172
|
+
params=(
|
|
173
|
+
Param(
|
|
174
|
+
name='key_id',
|
|
175
|
+
location='path',
|
|
176
|
+
kind='string',
|
|
177
|
+
required=True,
|
|
178
|
+
description='Key Id',
|
|
179
|
+
),
|
|
180
|
+
),
|
|
181
|
+
body=None,
|
|
182
|
+
response=Response(
|
|
183
|
+
kind='json',
|
|
184
|
+
model='api_key:ApiKeyRotated',
|
|
185
|
+
shape='object',
|
|
186
|
+
),
|
|
187
|
+
examples=(
|
|
188
|
+
'databay api-key rotate <key_id> --yes',
|
|
189
|
+
),
|
|
190
|
+
)
|
|
191
|
+
|
|
192
|
+
OPERATIONS = (
|
|
193
|
+
API_KEY_CREATE,
|
|
194
|
+
API_KEY_GET,
|
|
195
|
+
API_KEY_LIST,
|
|
196
|
+
API_KEY_REVOKE,
|
|
197
|
+
API_KEY_ROTATE,
|
|
198
|
+
)
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
"""The ``api-key-project`` operations.
|
|
2
|
+
|
|
3
|
+
Generated by python/tools/gen_client.py from contract/core.json; do not edit.
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
from databay.operation import Operation, Param, Response
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
API_KEY_PROJECT_ADD = Operation(
|
|
10
|
+
operation_id='api_key_project_add',
|
|
11
|
+
noun='api-key-project',
|
|
12
|
+
verb='add',
|
|
13
|
+
method='put',
|
|
14
|
+
path='/api/auth/api-keys/{key_id}/projects/{project_id}',
|
|
15
|
+
summary='Add Project',
|
|
16
|
+
description='Let the key reach one more project, with its role.',
|
|
17
|
+
project='path:project_id',
|
|
18
|
+
destructive=False,
|
|
19
|
+
idempotent=False,
|
|
20
|
+
since='1.0',
|
|
21
|
+
params=(
|
|
22
|
+
Param(
|
|
23
|
+
name='key_id',
|
|
24
|
+
location='path',
|
|
25
|
+
kind='string',
|
|
26
|
+
required=True,
|
|
27
|
+
description='Key Id',
|
|
28
|
+
),
|
|
29
|
+
Param(
|
|
30
|
+
name='project_id',
|
|
31
|
+
location='path',
|
|
32
|
+
kind='string',
|
|
33
|
+
required=True,
|
|
34
|
+
description='Project Id',
|
|
35
|
+
),
|
|
36
|
+
),
|
|
37
|
+
body=None,
|
|
38
|
+
response=Response(
|
|
39
|
+
kind='json',
|
|
40
|
+
model='api_key_project:ApiKeyProjectOut',
|
|
41
|
+
shape='object',
|
|
42
|
+
),
|
|
43
|
+
examples=(
|
|
44
|
+
'databay api-key-project add <key_id> <project_id>',
|
|
45
|
+
),
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
API_KEY_PROJECT_BI_CONNECTION = Operation(
|
|
49
|
+
operation_id='api_key_project_bi_connection',
|
|
50
|
+
noun='api-key-project',
|
|
51
|
+
verb='bi-connection',
|
|
52
|
+
method='get',
|
|
53
|
+
path='/api/auth/api-keys/{key_id}/projects/{project_id}/bi-connection',
|
|
54
|
+
summary='Bi Connection',
|
|
55
|
+
description="Where a BI tool signs in with the key for this project; the password is the key's secret, not shown here.",
|
|
56
|
+
project='path:project_id',
|
|
57
|
+
destructive=False,
|
|
58
|
+
idempotent=False,
|
|
59
|
+
since='1.0',
|
|
60
|
+
params=(
|
|
61
|
+
Param(
|
|
62
|
+
name='key_id',
|
|
63
|
+
location='path',
|
|
64
|
+
kind='string',
|
|
65
|
+
required=True,
|
|
66
|
+
description='Key Id',
|
|
67
|
+
),
|
|
68
|
+
Param(
|
|
69
|
+
name='project_id',
|
|
70
|
+
location='path',
|
|
71
|
+
kind='string',
|
|
72
|
+
required=True,
|
|
73
|
+
description='Project Id',
|
|
74
|
+
),
|
|
75
|
+
),
|
|
76
|
+
body=None,
|
|
77
|
+
response=Response(
|
|
78
|
+
kind='json',
|
|
79
|
+
model='api_key_project:ApiKeyBiConnectionOut',
|
|
80
|
+
shape='object',
|
|
81
|
+
),
|
|
82
|
+
examples=(
|
|
83
|
+
'databay api-key-project bi-connection <key_id> <project_id>',
|
|
84
|
+
),
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
API_KEY_PROJECT_REMOVE = Operation(
|
|
88
|
+
operation_id='api_key_project_remove',
|
|
89
|
+
noun='api-key-project',
|
|
90
|
+
verb='remove',
|
|
91
|
+
method='delete',
|
|
92
|
+
path='/api/auth/api-keys/{key_id}/projects/{project_id}',
|
|
93
|
+
summary='Remove Project',
|
|
94
|
+
description='Take one project from the key; a key keeps at least one.',
|
|
95
|
+
project='path:project_id',
|
|
96
|
+
destructive=True,
|
|
97
|
+
idempotent=False,
|
|
98
|
+
since='1.0',
|
|
99
|
+
params=(
|
|
100
|
+
Param(
|
|
101
|
+
name='key_id',
|
|
102
|
+
location='path',
|
|
103
|
+
kind='string',
|
|
104
|
+
required=True,
|
|
105
|
+
description='Key Id',
|
|
106
|
+
),
|
|
107
|
+
Param(
|
|
108
|
+
name='project_id',
|
|
109
|
+
location='path',
|
|
110
|
+
kind='string',
|
|
111
|
+
required=True,
|
|
112
|
+
description='Project Id',
|
|
113
|
+
),
|
|
114
|
+
),
|
|
115
|
+
body=None,
|
|
116
|
+
response=Response(
|
|
117
|
+
kind='json',
|
|
118
|
+
model='api_key_project:ApiKeyProjectOut',
|
|
119
|
+
shape='object',
|
|
120
|
+
),
|
|
121
|
+
examples=(
|
|
122
|
+
'databay api-key-project remove <key_id> <project_id> --yes',
|
|
123
|
+
),
|
|
124
|
+
)
|
|
125
|
+
|
|
126
|
+
OPERATIONS = (
|
|
127
|
+
API_KEY_PROJECT_ADD,
|
|
128
|
+
API_KEY_PROJECT_BI_CONNECTION,
|
|
129
|
+
API_KEY_PROJECT_REMOVE,
|
|
130
|
+
)
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"""The ``backfill-reason-code`` operations.
|
|
2
|
+
|
|
3
|
+
Generated by python/tools/gen_client.py from contract/core.json; do not edit.
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
from databay.operation import Operation, Response
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
BACKFILL_REASON_CODE_LIST = Operation(
|
|
10
|
+
operation_id='backfill_reason_code_list',
|
|
11
|
+
noun='backfill-reason-code',
|
|
12
|
+
verb='list',
|
|
13
|
+
method='get',
|
|
14
|
+
path='/api/cdc/backfill/reason-codes',
|
|
15
|
+
summary='List Backfill Reason Codes',
|
|
16
|
+
description='Return the ``reason_code`` vocabulary a client may receive.\n\nClients must treat an unrecognised code as a generic failure and show ``reason``:\nnew codes are added without a version bump.',
|
|
17
|
+
project=None,
|
|
18
|
+
destructive=False,
|
|
19
|
+
idempotent=False,
|
|
20
|
+
since='1.0',
|
|
21
|
+
params=(),
|
|
22
|
+
body=None,
|
|
23
|
+
response=Response(
|
|
24
|
+
kind='json',
|
|
25
|
+
model='backfill_reason_code:BackfillReasonCodeListResponse',
|
|
26
|
+
shape='array',
|
|
27
|
+
),
|
|
28
|
+
examples=(
|
|
29
|
+
'databay backfill-reason-code list',
|
|
30
|
+
),
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
OPERATIONS = (
|
|
34
|
+
BACKFILL_REASON_CODE_LIST,
|
|
35
|
+
)
|
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
"""The ``backfill-run`` operations.
|
|
2
|
+
|
|
3
|
+
Generated by python/tools/gen_client.py from contract/core.json; do not edit.
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
from databay.operation import Body, Operation, Param, Response, Wait
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
BACKFILL_RUN_CANCEL = Operation(
|
|
10
|
+
operation_id='backfill_run_cancel',
|
|
11
|
+
noun='backfill-run',
|
|
12
|
+
verb='cancel',
|
|
13
|
+
method='delete',
|
|
14
|
+
path='/api/cdc/backfill/runs/{run_uuid}',
|
|
15
|
+
summary='Cancel Backfill',
|
|
16
|
+
description="Force a stuck backfill run terminal so the pipe can be backfilled again.\n\nUse this when a run never finishes and the pipe keeps answering 409 to new backfills.\nIt does not stop work already running on the engine; it closes the run record as\n``failed`` (kept in history) and releases the pipe.\n\n404 covers a missing run, another organization's run and an already-terminal run.",
|
|
17
|
+
project=None,
|
|
18
|
+
destructive=True,
|
|
19
|
+
idempotent=False,
|
|
20
|
+
since='1.0',
|
|
21
|
+
params=(
|
|
22
|
+
Param(
|
|
23
|
+
name='run_uuid',
|
|
24
|
+
location='path',
|
|
25
|
+
kind='string',
|
|
26
|
+
required=True,
|
|
27
|
+
description='UUID of the backfill run to cancel',
|
|
28
|
+
),
|
|
29
|
+
),
|
|
30
|
+
body=None,
|
|
31
|
+
response=Response(
|
|
32
|
+
kind='json',
|
|
33
|
+
model='backfill_run:BackfillRunCancelResponse',
|
|
34
|
+
shape='object',
|
|
35
|
+
),
|
|
36
|
+
examples=(
|
|
37
|
+
'databay backfill-run cancel <run_uuid> --yes',
|
|
38
|
+
),
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
BACKFILL_RUN_CREATE = Operation(
|
|
42
|
+
operation_id='backfill_run_create',
|
|
43
|
+
noun='backfill-run',
|
|
44
|
+
verb='create',
|
|
45
|
+
method='post',
|
|
46
|
+
path='/api/cdc/backfill',
|
|
47
|
+
summary='Trigger Backfill',
|
|
48
|
+
description="Re-read the pipe's table.\n\nA streaming pipe is resynced: its table is copied again from a new snapshot (the rebuild\nroute's ``snapshot`` source), and ``Idempotency-Key``, when sent, is that rebuild's key: repeating\nit returns that rebuild, whatever the body says. Any other pipe ignores the key.",
|
|
49
|
+
project=None,
|
|
50
|
+
destructive=True,
|
|
51
|
+
idempotent=True,
|
|
52
|
+
since='1.0',
|
|
53
|
+
params=(),
|
|
54
|
+
body=Body(
|
|
55
|
+
schema='BackfillV2Create',
|
|
56
|
+
fields=(
|
|
57
|
+
Param(
|
|
58
|
+
name='cursor_field',
|
|
59
|
+
location='body',
|
|
60
|
+
kind='string',
|
|
61
|
+
required=False,
|
|
62
|
+
description="Optional cursor column to scope the backfill (e.g. 'updated_at'); the sync resumes from the given cursor. Not every engine supports it.",
|
|
63
|
+
nullable=True,
|
|
64
|
+
),
|
|
65
|
+
Param(
|
|
66
|
+
name='pipe_uuid',
|
|
67
|
+
location='body',
|
|
68
|
+
kind='string',
|
|
69
|
+
required=True,
|
|
70
|
+
description='UUID of the v2 pipe to sync',
|
|
71
|
+
),
|
|
72
|
+
Param(
|
|
73
|
+
name='snapshot_type',
|
|
74
|
+
location='body',
|
|
75
|
+
kind='string',
|
|
76
|
+
required=False,
|
|
77
|
+
description='How the re-read is performed on a streaming pipe. `incremental` walks the table by primary key while replication keeps running, reconciling against the live stream. `blocking` pauses replication, re-reads the table in one pass, then resumes from the paused offset — faster and point-in-time consistent, at the cost of replication lag for the duration. `where_clause` means the same thing in both modes. Requesting `blocking` on a backend that cannot pause its own stream is a 422 rather than a signal that would be silently dropped.',
|
|
78
|
+
choices=(
|
|
79
|
+
'incremental',
|
|
80
|
+
'blocking',
|
|
81
|
+
),
|
|
82
|
+
),
|
|
83
|
+
Param(
|
|
84
|
+
name='start_date',
|
|
85
|
+
location='body',
|
|
86
|
+
kind='string',
|
|
87
|
+
required=False,
|
|
88
|
+
description="Re-read history from this ISO date (YYYY-MM-DD). Only pipes whose engine re-runs a source from a date accept it (scheduled SaaS pipes); anywhere else it is a 422, never a silently ignored window. Clamped server-side to the source's backfill ceiling (see GET /api/cdc/backfill/limits); omit it for 'as far back as this source allows'. The response says what actually ran.",
|
|
89
|
+
nullable=True,
|
|
90
|
+
),
|
|
91
|
+
Param(
|
|
92
|
+
name='where_clause',
|
|
93
|
+
location='body',
|
|
94
|
+
kind='string',
|
|
95
|
+
required=False,
|
|
96
|
+
description='Row filter scoping the backfill, e.g. "status = \'pending\' AND amount > 100". Accepted only where the pipe\'s engine supports a filtered backfill (`supports_filtered_backfill` in GET /api/cdc/pipe/config-options); elsewhere it is a 422. NOT arbitrary SQL: the expression is parsed against a restricted grammar — columns this pipe replicates, comparison and boolean operators, IS NULL, IN, BETWEEN, and literals — and rebuilt from the parse tree before use. Function calls, subqueries, casts and comments are rejected with 422. A full `SELECT ... FROM ... WHERE ...` is therefore invalid in either snapshot mode: pass only the condition that would follow WHERE.',
|
|
97
|
+
nullable=True,
|
|
98
|
+
),
|
|
99
|
+
),
|
|
100
|
+
),
|
|
101
|
+
response=Response(
|
|
102
|
+
kind='json',
|
|
103
|
+
model='backfill_run:BackfillV2Response',
|
|
104
|
+
shape='object',
|
|
105
|
+
),
|
|
106
|
+
examples=(
|
|
107
|
+
'databay backfill-run create --pipe-uuid <pipe_uuid> --yes',
|
|
108
|
+
),
|
|
109
|
+
wait=Wait(
|
|
110
|
+
status_operation='backfill_run_get',
|
|
111
|
+
bind=(
|
|
112
|
+
(
|
|
113
|
+
'run_uuid',
|
|
114
|
+
'/run_uuid',
|
|
115
|
+
),
|
|
116
|
+
),
|
|
117
|
+
field='/state',
|
|
118
|
+
pending=(
|
|
119
|
+
'running',
|
|
120
|
+
),
|
|
121
|
+
success=(
|
|
122
|
+
'finished',
|
|
123
|
+
),
|
|
124
|
+
failure=(
|
|
125
|
+
'failed',
|
|
126
|
+
'rejected',
|
|
127
|
+
),
|
|
128
|
+
error_field='/reason',
|
|
129
|
+
),
|
|
130
|
+
)
|
|
131
|
+
|
|
132
|
+
BACKFILL_RUN_GET = Operation(
|
|
133
|
+
operation_id='backfill_run_get',
|
|
134
|
+
noun='backfill-run',
|
|
135
|
+
verb='get',
|
|
136
|
+
method='get',
|
|
137
|
+
path='/api/cdc/backfill/runs/{run_uuid}',
|
|
138
|
+
summary='Get Backfill Run Detail',
|
|
139
|
+
description='One backfill run, by the ``run_uuid`` the trigger response returned.\n\nPoll it until it reaches a terminal state.',
|
|
140
|
+
project=None,
|
|
141
|
+
destructive=False,
|
|
142
|
+
idempotent=False,
|
|
143
|
+
since='1.0',
|
|
144
|
+
params=(
|
|
145
|
+
Param(
|
|
146
|
+
name='run_uuid',
|
|
147
|
+
location='path',
|
|
148
|
+
kind='string',
|
|
149
|
+
required=True,
|
|
150
|
+
description='UUID of the backfill run',
|
|
151
|
+
),
|
|
152
|
+
),
|
|
153
|
+
body=None,
|
|
154
|
+
response=Response(
|
|
155
|
+
kind='json',
|
|
156
|
+
model='shared:BackfillRunResponse',
|
|
157
|
+
shape='object',
|
|
158
|
+
),
|
|
159
|
+
examples=(
|
|
160
|
+
'databay backfill-run get <run_uuid>',
|
|
161
|
+
),
|
|
162
|
+
resumes=Wait(
|
|
163
|
+
status_operation='backfill_run_get',
|
|
164
|
+
bind=(
|
|
165
|
+
(
|
|
166
|
+
'run_uuid',
|
|
167
|
+
'path:run_uuid',
|
|
168
|
+
),
|
|
169
|
+
),
|
|
170
|
+
field='/state',
|
|
171
|
+
pending=(
|
|
172
|
+
'running',
|
|
173
|
+
),
|
|
174
|
+
success=(
|
|
175
|
+
'finished',
|
|
176
|
+
),
|
|
177
|
+
failure=(
|
|
178
|
+
'failed',
|
|
179
|
+
'rejected',
|
|
180
|
+
),
|
|
181
|
+
error_field='/reason',
|
|
182
|
+
),
|
|
183
|
+
)
|
|
184
|
+
|
|
185
|
+
BACKFILL_RUN_LIST = Operation(
|
|
186
|
+
operation_id='backfill_run_list',
|
|
187
|
+
noun='backfill-run',
|
|
188
|
+
verb='list',
|
|
189
|
+
method='get',
|
|
190
|
+
path='/api/cdc/backfill/runs',
|
|
191
|
+
summary='List Backfill Run History',
|
|
192
|
+
description='Every backfill this organization has run, newest first.',
|
|
193
|
+
project=None,
|
|
194
|
+
destructive=False,
|
|
195
|
+
idempotent=False,
|
|
196
|
+
since='1.0',
|
|
197
|
+
params=(
|
|
198
|
+
Param(
|
|
199
|
+
name='state',
|
|
200
|
+
location='query',
|
|
201
|
+
kind='string',
|
|
202
|
+
required=False,
|
|
203
|
+
description='Only runs in this state',
|
|
204
|
+
choices=(
|
|
205
|
+
'running',
|
|
206
|
+
'finished',
|
|
207
|
+
'failed',
|
|
208
|
+
'rejected',
|
|
209
|
+
),
|
|
210
|
+
nullable=True,
|
|
211
|
+
),
|
|
212
|
+
Param(
|
|
213
|
+
name='cursor',
|
|
214
|
+
location='query',
|
|
215
|
+
kind='string',
|
|
216
|
+
required=False,
|
|
217
|
+
description='Opaque page cursor from a previous response',
|
|
218
|
+
nullable=True,
|
|
219
|
+
),
|
|
220
|
+
Param(
|
|
221
|
+
name='limit',
|
|
222
|
+
location='query',
|
|
223
|
+
kind='integer',
|
|
224
|
+
required=False,
|
|
225
|
+
description='Page size',
|
|
226
|
+
),
|
|
227
|
+
),
|
|
228
|
+
body=None,
|
|
229
|
+
response=Response(
|
|
230
|
+
kind='json',
|
|
231
|
+
model='shared:BackfillRunPage',
|
|
232
|
+
shape='object',
|
|
233
|
+
),
|
|
234
|
+
examples=(
|
|
235
|
+
'databay backfill-run list',
|
|
236
|
+
'databay backfill-run list --state running',
|
|
237
|
+
),
|
|
238
|
+
)
|
|
239
|
+
|
|
240
|
+
OPERATIONS = (
|
|
241
|
+
BACKFILL_RUN_CANCEL,
|
|
242
|
+
BACKFILL_RUN_CREATE,
|
|
243
|
+
BACKFILL_RUN_GET,
|
|
244
|
+
BACKFILL_RUN_LIST,
|
|
245
|
+
)
|