feat: SDK update for version 22.1.0#151
Conversation
Greptile SummaryThis PR updates the Python SDK for Appwrite 22.1.0. The main changes are:
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (2): Last reviewed commit: "chore: merge main into dev for 22.1.0" | Re-trigger Greptile |
|
|
||
| api_params['name'] = self._normalize_value(name) |
There was a problem hiding this comment.
When callers pass expire=None to make an existing key unlimited, this changed path now omits expire instead of sending JSON null. The method still documents null as the unlimited-expiration value, so the server can leave the old expiration in place and the key can still expire.
Prompt To Fix With AI
This is a comment left during a code review.
Path: appwrite/services/project.py
Line: 433-434
Comment:
**Null Expiration Is Dropped**
When callers pass `expire=None` to make an existing key unlimited, this changed path now omits `expire` instead of sending JSON null. The method still documents null as the unlimited-expiration value, so the server can leave the old expiration in place and the key can still expire.
How can I resolve this? If you propose a fix, please make it concise.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
| api_params['keyId'] = self._normalize_value(key_id) | ||
| api_params['name'] = self._normalize_value(name) | ||
| api_params['scopes'] = self._normalize_value(scopes) | ||
| api_params['expire'] = self._normalize_value(expire) | ||
| if expire is not None: | ||
| api_params['expire'] = self._normalize_value(expire) |
There was a problem hiding this comment.
Unlimited Key Creation Loses Null
When creating a key without an expiration, the documented value is explicit null, and the previous SDK sent expire=None as JSON null. This guard drops the field, so deployments where the endpoint requires or distinguishes explicit null can reject the create request or apply a different default expiration.
| api_params['keyId'] = self._normalize_value(key_id) | |
| api_params['name'] = self._normalize_value(name) | |
| api_params['scopes'] = self._normalize_value(scopes) | |
| api_params['expire'] = self._normalize_value(expire) | |
| if expire is not None: | |
| api_params['expire'] = self._normalize_value(expire) | |
| api_params['keyId'] = self._normalize_value(key_id) | |
| api_params['name'] = self._normalize_value(name) | |
| api_params['scopes'] = self._normalize_value(scopes) | |
| api_params['expire'] = self._normalize_value(expire) |
Prompt To Fix With AI
This is a comment left during a code review.
Path: appwrite/services/project.py
Line: 286-290
Comment:
**Unlimited Key Creation Loses Null**
When creating a key without an expiration, the documented value is explicit null, and the previous SDK sent `expire=None` as JSON null. This guard drops the field, so deployments where the endpoint requires or distinguishes explicit null can reject the create request or apply a different default expiration.
```suggestion
api_params['keyId'] = self._normalize_value(key_id)
api_params['name'] = self._normalize_value(name)
api_params['scopes'] = self._normalize_value(scopes)
api_params['expire'] = self._normalize_value(expire)
```
How can I resolve this? If you propose a fix, please make it concise.
This PR contains updates to the SDK for version 22.1.0.
What's Changed
new_specificationparameter frombackups.create_restorationDatabase.policiesandDatabase.archivesare now optionallist_consents,get_consent,delete_consentand consent token methodsOauth2ConsentandOauth2ConsentTokenmodelsoauth2.authorize_postmethod andoauth2.introspectkey scopeapps.list_o_auth2_scopesmethod andAppScopemodelActivityEventtokenparameter tosites.get_deployment_downloadAppSecret.secretis always empty; the secret is returned only on creation