snowflake-native-apps-permission-stub 0.1.9__tar.gz → 0.1.11__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (17) hide show
  1. {snowflake-native-apps-permission-stub-0.1.9 → snowflake-native-apps-permission-stub-0.1.11}/PKG-INFO +1 -1
  2. {snowflake-native-apps-permission-stub-0.1.9 → snowflake-native-apps-permission-stub-0.1.11}/README.md +3 -1
  3. snowflake-native-apps-permission-stub-0.1.11/src/snowflake/permissions.py +222 -0
  4. snowflake-native-apps-permission-stub-0.1.11/src/snowflake/version.py +2 -0
  5. {snowflake-native-apps-permission-stub-0.1.9 → snowflake-native-apps-permission-stub-0.1.11}/src/snowflake_native_apps_permission_stub.egg-info/PKG-INFO +1 -1
  6. snowflake-native-apps-permission-stub-0.1.9/src/snowflake/permissions.py +0 -61
  7. snowflake-native-apps-permission-stub-0.1.9/src/snowflake/version.py +0 -2
  8. {snowflake-native-apps-permission-stub-0.1.9 → snowflake-native-apps-permission-stub-0.1.11}/LICENSE.txt +0 -0
  9. {snowflake-native-apps-permission-stub-0.1.9 → snowflake-native-apps-permission-stub-0.1.11}/pyproject.toml +0 -0
  10. {snowflake-native-apps-permission-stub-0.1.9 → snowflake-native-apps-permission-stub-0.1.11}/setup.cfg +0 -0
  11. {snowflake-native-apps-permission-stub-0.1.9 → snowflake-native-apps-permission-stub-0.1.11}/setup.py +0 -0
  12. {snowflake-native-apps-permission-stub-0.1.9 → snowflake-native-apps-permission-stub-0.1.11}/src/snowflake/__init__.py +0 -0
  13. {snowflake-native-apps-permission-stub-0.1.9 → snowflake-native-apps-permission-stub-0.1.11}/src/snowflake_native_apps_permission_stub.egg-info/SOURCES.txt +0 -0
  14. {snowflake-native-apps-permission-stub-0.1.9 → snowflake-native-apps-permission-stub-0.1.11}/src/snowflake_native_apps_permission_stub.egg-info/dependency_links.txt +0 -0
  15. {snowflake-native-apps-permission-stub-0.1.9 → snowflake-native-apps-permission-stub-0.1.11}/src/snowflake_native_apps_permission_stub.egg-info/requires.txt +0 -0
  16. {snowflake-native-apps-permission-stub-0.1.9 → snowflake-native-apps-permission-stub-0.1.11}/src/snowflake_native_apps_permission_stub.egg-info/top_level.txt +0 -0
  17. {snowflake-native-apps-permission-stub-0.1.9 → snowflake-native-apps-permission-stub-0.1.11}/src/snowflake_native_apps_permission_stub.egg-info/zip-safe +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: snowflake-native-apps-permission-stub
3
- Version: 0.1.9
3
+ Version: 0.1.11
4
4
  Summary: Snowflake Native App Permission SDK Stub
5
5
  Home-page: UNKNOWN
6
6
  Author: Snowflake, Inc
@@ -1,4 +1,6 @@
1
1
  # native-apps-permission-sdk-stub
2
2
  This is a stub version of Python Permission SDK. The functions in this SDK return default values.
3
3
 
4
- When deploying your application, do not upload this package to Snowflake.
4
+ When deploying your application, do not upload this package to Snowflake.
5
+
6
+ Please remember bumping the version to the same as permission SDK version.
@@ -0,0 +1,222 @@
1
+ from .version import __version__
2
+ from typing import List
3
+
4
+ class AwsGateway:
5
+ API_GATEWAY = 1,
6
+ PRIVATE_API_GATEWAY = 2,
7
+ GOV_API_GATEWAY = 3,
8
+ GOV_PRIVATE_API_GATEWAY = 4
9
+
10
+ def request_account_privileges(privileges: [str]) -> None:
11
+ """Requests privileges from the consumer specified by a string array passed to the function
12
+ that contains the privileges. The specified privileges must be listed in the manifest file.
13
+
14
+ Args:
15
+ privileges: list of account level privileges
16
+
17
+ Returns:
18
+ None
19
+ """
20
+ pass
21
+
22
+ def request_reference(reference: str) -> None:
23
+ """Requests a reference from the consumer specified by the string passed to the function.
24
+ The reference passed to the function must be defined in the manifest file.
25
+ Refer to Object types and privileges that a reference can contain for the objects that
26
+ can be included in a reference and their supported privileges.
27
+
28
+ Args:
29
+ reference: reference name
30
+
31
+ Returns:
32
+ None
33
+ """
34
+ pass
35
+
36
+ def request_aws_api_integration(id: str, allowed_prefixes: [str], gateway: AwsGateway,
37
+ aws_role_arn: str,
38
+ api_key: str = None, name: str = None,
39
+ comment: str = None) -> None:
40
+ """Requests an API integration from the consumer for the Amazon API Gateway.
41
+
42
+ Args:
43
+ id: The name of the API integration defined in the manifest file
44
+ allowed_prefixes: Explicitly limits external functions that use the integration to reference one or more HTTPS proxy service endpoints
45
+ gateway: Type of gateway can have the following values:
46
+ - permissions.AwsGateway.API_GATEWAY
47
+ - permissions.AwsGateway.PRIVATE_API_GATEWAY
48
+ - permissions.AwsGateway.GOV_API_GATEWAY
49
+ - permissions.AwsGateway.GOV_PRIVATE_API_GATEWAY
50
+ aws_role_arn: ARN (Amazon resource name) of a cloud platform role.
51
+ api_key: API key for the integration
52
+ name: API integration name
53
+ comment: Description of the integration
54
+
55
+ Returns:
56
+ None
57
+ """
58
+ pass
59
+
60
+ def request_azure_api_integration(id: str, allowed_prefixes: [str], tenant_id: str, application_id: str,
61
+ api_key: str = None, name: str = None,
62
+ comment: str = None) -> None:
63
+ """Requests an API integration from the consumer for the Amazon API Gateway.
64
+
65
+ Args:
66
+ id: The name of the API integration defined in the manifest file
67
+ allowed_prefixes: Explicitly limits external functions that use the integration to reference one or more HTTPS proxy service endpoints
68
+ gateway: Type of gateway can have the following values:
69
+ - permissions.AwsGateway.API_GATEWAY
70
+ - permissions.AwsGateway.PRIVATE_API_GATEWAY
71
+ - permissions.AwsGateway.GOV_API_GATEWAY
72
+ - permissions.AwsGateway.GOV_PRIVATE_API_GATEWAY
73
+ aws_role_arn: ARN (Amazon resource name) of a cloud platform role.
74
+ api_key: API key for the integration
75
+ name: API integration name
76
+ comment: Description of the integration
77
+
78
+ Returns:
79
+ None
80
+ """
81
+ pass
82
+
83
+ def request_google_api_integration(id: str, allowed_prefixes: [str], audience: str, name: str = None,
84
+ comment: str = None, api_key: str = None) -> None:
85
+ """Requests an API integration from the consumer for Azure API Management.
86
+
87
+ Args:
88
+ id: The name of the API integration defined in the manifest file
89
+ allowed_prefixes: Explicitly limits external functions that use the integration to reference one or more HTTPS proxy service endpoints
90
+ audience: This is used as the audience claim when generating the JWT (JSON Web Token) to authenticate to the Google API Gateway.
91
+ name: API integration name
92
+ comment: Description of the integration
93
+ api_key: API key for the integration
94
+
95
+ Returns:
96
+ None
97
+ """
98
+ pass
99
+
100
+ def request_share(share_name: str, db_name: str, db_role: str, accounts: [str]) -> None:
101
+ pass
102
+
103
+ def request_application_specification_review(spec_names: [str] = None) -> None:
104
+ """Opens a dialog on the Streamlit for consumer to review then approve, decline (only on optional spec)
105
+ or take no action on given application specifications.
106
+
107
+ Args:
108
+ spec_names: Optional list of specifications for review, if not specified, display all the specifications.
109
+
110
+ Returns:
111
+ None
112
+ """
113
+ pass
114
+
115
+ def get_held_account_privileges(privilege_names: [str]) -> [str]:
116
+ """Returns an array containing the privileges that have been granted to the Snowflake
117
+ Native App based on the array of privileges passed to the function.
118
+
119
+ Args:
120
+ privilege_names: list of account level privileges to validate
121
+
122
+ Returns:
123
+ Array of granted account privileges
124
+ """
125
+ return []
126
+
127
+ def get_missing_account_privileges(privilege_names: [str]) -> [str]:
128
+ """Returns an array containing the privileges that have not been granted to the Snowflake
129
+ Native App based on the specified array of privileges.
130
+
131
+ Args:
132
+ privilege_names: array of privileges to validate
133
+
134
+ Returns:
135
+ Array of missing account privileges
136
+ """
137
+ return privilege_names
138
+
139
+ def get_reference_associations(reference_name: str) -> [str]:
140
+ """Iterates through all associations for a reference and returns information about the associations.
141
+
142
+ Args:
143
+ reference_name: the name of the reference
144
+
145
+ Returns:
146
+ Array of reference associations
147
+ """
148
+ return []
149
+
150
+ def get_detailed_reference_associations(reference_name: str) -> List[dict]:
151
+ """Iterates through all associations for a reference and returns detailed information about the associations.
152
+
153
+ Args:
154
+ reference_name: the name of the reference
155
+
156
+ Returns:
157
+ Returns an array of dictionaries. Each dictionary contains the following key/value pairs:
158
+ {
159
+ "alias": "<value>",
160
+ "database": "<value>",
161
+ "schema": "<value>",
162
+ "name": "<value>"
163
+ }
164
+ - alias: The system-generated alias for the reference.
165
+ - database: The parent database name of the consumer object, if the object resides in a database. Otherwise, null.
166
+ - schema: The parent schema of the consumer object, if the object resides in a schema. Otherwise, null.
167
+ - name: The name of the consumer object.
168
+ """
169
+ return []
170
+
171
+ def get_application_specifications() -> List[dict]:
172
+ """Get all the specifications in the current application
173
+
174
+ Returns:
175
+ An array of dictionaries.
176
+ Each dictionary contains the following key/value pairs:
177
+ {
178
+ “name”: “<value>”,
179
+ “created_on”: “<value>”,
180
+ “type”: “<value>”,
181
+ “sequence_number”: “<value>”,
182
+ “status”: “<value>”,
183
+ "status_upgraded_on": “<value>”,
184
+ “label”: “<value>”,
185
+ “description”: “<value>”,
186
+ “definition“: “<value>”,
187
+ “optional”: “<value>”,
188
+ }
189
+ """
190
+ return []
191
+
192
+ def request_event_sharing() -> None:
193
+ """Opens a dialog for configuring event sharing"""
194
+ pass
195
+
196
+ def is_event_sharing_enabled() -> bool:
197
+ """Check if event sharing is enabled
198
+
199
+ Returns:
200
+ True if event sharing is enabled on the current app and the app has an active event table, else False.
201
+ """
202
+ return False
203
+
204
+ def is_application_local_to_package() -> bool:
205
+ """Check if the application is installed from same account."""
206
+ return False
207
+
208
+ def is_application_authorized_for_telemetry_event_sharing() -> bool:
209
+ """Check if the current application is authorized for telemetry event sharing, false otherwise."""
210
+ return False
211
+
212
+ def is_application_all_mandatory_telemetry_event_definitions_enabled() -> bool:
213
+ """Check if all mandatory telemetry events are enabled, false otherwise. """
214
+ return False
215
+
216
+ def request_external_data() -> None:
217
+ """Request consent from the consumer to use external and iceberg table."""
218
+ pass
219
+
220
+ def is_external_data_enabled() -> bool:
221
+ """Check if the current application is enabled to use external and iceberg table."""
222
+ return False
@@ -0,0 +1,2 @@
1
+ __version__ = '0.1.11'
2
+
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: snowflake-native-apps-permission-stub
3
- Version: 0.1.9
3
+ Version: 0.1.11
4
4
  Summary: Snowflake Native App Permission SDK Stub
5
5
  Home-page: UNKNOWN
6
6
  Author: Snowflake, Inc
@@ -1,61 +0,0 @@
1
- from .version import __version__
2
-
3
- class AwsGateway:
4
- API_GATEWAY = 1,
5
- PRIVATE_API_GATEWAY = 2,
6
- GOV_API_GATEWAY = 3,
7
- GOV_PRIVATE_API_GATEWAY = 4
8
-
9
- def request_account_privileges(privileges: [str]) -> None:
10
- pass
11
-
12
- def request_reference(reference: str) -> None:
13
- pass
14
-
15
- def request_aws_api_integration(id: str, allowed_prefixes: [str], gateway: AwsGateway,
16
- aws_role_arn: str,
17
- api_key: str = None, name: str = None,
18
- comment: str = None) -> None:
19
- pass
20
-
21
- def request_azure_api_integration(id: str, allowed_prefixes: [str], tenant_id: str, application_id: str,
22
- api_key: str = None, name: str = None,
23
- comment: str = None) -> None:
24
- pass
25
-
26
- def request_google_api_integration(id: str, allowed_prefixes: [str], audience: str, name: str = None,
27
- comment: str = None, api_key: str = None) -> None:
28
- pass
29
-
30
- def request_share(share_name: str, db_name: str, db_role: str, accounts: [str]) -> None:
31
- pass
32
-
33
- def get_held_account_privileges(privilege_names: [str]) -> [str]:
34
- return []
35
-
36
- def get_missing_account_privileges(privilege_names: [str]) -> [str]:
37
- return privilege_names
38
-
39
- def get_reference_associations(reference_name: str) -> [str]:
40
- return []
41
-
42
- def request_event_sharing() -> None:
43
- pass
44
-
45
- def is_event_sharing_enabled() -> bool:
46
- return False
47
-
48
- def is_application_local_to_package() -> bool:
49
- return False
50
-
51
- def is_application_authorized_for_telemetry_event_sharing() -> bool:
52
- return False
53
-
54
- def is_application_all_mandatory_telemetry_event_definitions_enabled() -> bool:
55
- return False
56
-
57
- def request_external_data() -> None:
58
- pass
59
-
60
- def is_external_data_enabled() -> bool:
61
- return False
@@ -1,2 +0,0 @@
1
- __version__ = '0.1.9'
2
-