snowflake-native-apps-permission-stub 0.1.10__py3-none-any.whl → 0.1.11__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.
snowflake/permissions.py CHANGED
@@ -8,58 +8,215 @@ class AwsGateway:
8
8
  GOV_PRIVATE_API_GATEWAY = 4
9
9
 
10
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
+ """
11
20
  pass
12
21
 
13
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
+ """
14
34
  pass
15
35
 
16
36
  def request_aws_api_integration(id: str, allowed_prefixes: [str], gateway: AwsGateway,
17
37
  aws_role_arn: str,
18
38
  api_key: str = None, name: str = None,
19
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
+ """
20
58
  pass
21
59
 
22
60
  def request_azure_api_integration(id: str, allowed_prefixes: [str], tenant_id: str, application_id: str,
23
61
  api_key: str = None, name: str = None,
24
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
+ """
25
81
  pass
26
82
 
27
83
  def request_google_api_integration(id: str, allowed_prefixes: [str], audience: str, name: str = None,
28
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
+ """
29
98
  pass
30
99
 
31
100
  def request_share(share_name: str, db_name: str, db_role: str, accounts: [str]) -> None:
32
101
  pass
33
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
+
34
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
+ """
35
125
  return []
36
126
 
37
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
+ """
38
137
  return privilege_names
39
138
 
40
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
+ """
41
148
  return []
42
149
 
43
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
+ """
44
190
  return []
45
191
 
46
192
  def request_event_sharing() -> None:
193
+ """Opens a dialog for configuring event sharing"""
47
194
  pass
48
195
 
49
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
+ """
50
202
  return False
51
203
 
52
204
  def is_application_local_to_package() -> bool:
205
+ """Check if the application is installed from same account."""
53
206
  return False
54
207
 
55
208
  def is_application_authorized_for_telemetry_event_sharing() -> bool:
209
+ """Check if the current application is authorized for telemetry event sharing, false otherwise."""
56
210
  return False
57
211
 
58
212
  def is_application_all_mandatory_telemetry_event_definitions_enabled() -> bool:
213
+ """Check if all mandatory telemetry events are enabled, false otherwise. """
59
214
  return False
60
215
 
61
216
  def request_external_data() -> None:
217
+ """Request consent from the consumer to use external and iceberg table."""
62
218
  pass
63
219
 
64
220
  def is_external_data_enabled() -> bool:
221
+ """Check if the current application is enabled to use external and iceberg table."""
65
222
  return False
snowflake/version.py CHANGED
@@ -1,2 +1,2 @@
1
- __version__ = '0.1.10'
1
+ __version__ = '0.1.11'
2
2
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: snowflake-native-apps-permission-stub
3
- Version: 0.1.10
3
+ Version: 0.1.11
4
4
  Summary: Snowflake Native App Permission SDK Stub
5
5
  Home-page: UNKNOWN
6
6
  Author: Snowflake, Inc
@@ -0,0 +1,9 @@
1
+ snowflake/__init__.py,sha256=JZxHb015VU0EpPxmmqsalyGQCv6F2SP_rNSHgwhbdC8,25
2
+ snowflake/permissions.py,sha256=7KBGS0MYaF8CX3pKc7sjPhqRHE8RKEtHqm3WUBgw-PM,8373
3
+ snowflake/version.py,sha256=hKiQW_dKAqUn2yW0jc1MGYn4eoQ3xOnOcgRNG9hIn2w,24
4
+ snowflake_native_apps_permission_stub-0.1.11.dist-info/LICENSE.txt,sha256=Shs2Swxz8GRUMvBM5irDnKjIguM1uwru2AS23r_aMkE,11366
5
+ snowflake_native_apps_permission_stub-0.1.11.dist-info/METADATA,sha256=2MiD0mBIcbOyMCoQrPXurDKERvVyMxNp195fEl_pLHI,1442
6
+ snowflake_native_apps_permission_stub-0.1.11.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
7
+ snowflake_native_apps_permission_stub-0.1.11.dist-info/top_level.txt,sha256=TY0gFSHKDdZy3THb0FGomyikWQasEGldIR1O0HGOHVw,10
8
+ snowflake_native_apps_permission_stub-0.1.11.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
9
+ snowflake_native_apps_permission_stub-0.1.11.dist-info/RECORD,,
@@ -1,9 +0,0 @@
1
- snowflake/__init__.py,sha256=JZxHb015VU0EpPxmmqsalyGQCv6F2SP_rNSHgwhbdC8,25
2
- snowflake/permissions.py,sha256=GkF9vKjcHj5Dw32NoMC4oM94y5xSY3iOeZgGiUX58ls,1945
3
- snowflake/version.py,sha256=Be7QS0wEc3ebb3rbvX9TVXR8iGFkSJbn8wlwjC47cDg,24
4
- snowflake_native_apps_permission_stub-0.1.10.dist-info/LICENSE.txt,sha256=Shs2Swxz8GRUMvBM5irDnKjIguM1uwru2AS23r_aMkE,11366
5
- snowflake_native_apps_permission_stub-0.1.10.dist-info/METADATA,sha256=iVMQ-DIPVNyjOg_f6Uu_etisvt7-dYUOOap2atcWA0E,1442
6
- snowflake_native_apps_permission_stub-0.1.10.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
7
- snowflake_native_apps_permission_stub-0.1.10.dist-info/top_level.txt,sha256=TY0gFSHKDdZy3THb0FGomyikWQasEGldIR1O0HGOHVw,10
8
- snowflake_native_apps_permission_stub-0.1.10.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
9
- snowflake_native_apps_permission_stub-0.1.10.dist-info/RECORD,,