Skip to content

Commit cefc9eb

Browse files
committed
Merge pull-request #438
2 parents ff7c3a4 + 12698d9 commit cefc9eb

File tree

4 files changed

+11
-5
lines changed

4 files changed

+11
-5
lines changed

packages/telegram-cloud-storage-stamper/CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# @turnkey/telegram-cloud-storage-stamper
22

3+
## 1.0.1
4+
5+
### Patch Changes
6+
7+
- Update the default cloud storage key to conform to cloud storage key constraints
8+
39
## 1.0.0
410

511
### Major Changes

packages/telegram-cloud-storage-stamper/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Telegram Bot API >= 6.9
1212

1313
The Telegram Cloud Storage Stamper has a few different modes of operation, namely a classic [stamper](https://docs.turnkey.com/api-overview/stamps) for stamping requests made to Turnkey's API, and an interface for a Telegram Mini App built with Turnkey to interact with Telegram Cloud Storage. This provides the developer of the application utilities such as creating stamps on requests made by users, storing user API keys, storing temporary keys that are needed for decrypting credential bundles for activites like [email auth](https://docs.turnkey.com/features/email-auth) or [oauth](https://docs.turnkey.com/features/oauth), or storing arbitrary values that would be helpful to have saved for a user from session to session on device to device.
1414

15-
The Telegram Cloud Storage Stamper will, by default, store the API key used for signing in Telegram Cloud Storage under the key `@turnkey/TURNKEY_API_KEY`. A Cloud Storage "key" is the index under which a value is stored in Telegram Cloud Storage. This can be changed when using the `.create()` or `.setSigningKey()` functions. An API key is stored within Cloud Storage as a JSON string of the following object:
15+
The Telegram Cloud Storage Stamper will, by default, store the API key used for signing in Telegram Cloud Storage under the key `TURNKEY_API_KEY`. A Cloud Storage "key" is the index under which a value is stored in Telegram Cloud Storage. This can be changed when using the `.create()` or `.setSigningKey()` functions. An API key is stored within Cloud Storage as a JSON string of the following object:
1616

1717
```
1818
{
@@ -25,7 +25,7 @@ The Telegram Cloud Storage Stamper will, by default, store the API key used for
2525

2626
The `.create()` and `.setSigningKey()` functions take one of the following 4 sets of arguments:
2727

28-
- No arguments: Use an API key at the default location within Telegram Cloud Storage `@turnkey/TURNKEY_API_KEY` and set that as the signing key
28+
- No arguments: Use an API key at the default location within Telegram Cloud Storage `TURNKEY_API_KEY` and set that as the signing key
2929
- Just an API key: Store the passed in API key at the default Telegram Cloud Storage location and set that as the signing key
3030
- Just a Cloud Storage key: Use an API key stored at the specified Telegram Cloud Storage key location and set that as the signing key
3131
- Both an API key and a Cloud Storage key: Store the passed API key at the specified Telegram Cloud Storage key location and set that as the signing key
@@ -141,7 +141,7 @@ await stamper.insertAPIKey(
141141
);
142142
```
143143

144-
Set a new API key as the signing key for the stamper at a specified key. This will also insert the API key to that location within Telegram CloudStorage. Any subsequent requests for stamping will sign with this API key. The API key and CloudStorage key can also be omitted and the API key at the default location `@turnkey/TURNKEY_API_KEY` will be used. If an API key is omitted and a CloudStorage key is specified an API key at that location will be used. Refer to the [argument-usage](#argument-usage) section for a full explanation. A stamper that was originally used to just view Cloud Storage values can later be used for signing by using the `.setSigningKey()` function.
144+
Set a new API key as the signing key for the stamper at a specified key. This will also insert the API key to that location within Telegram CloudStorage. Any subsequent requests for stamping will sign with this API key. The API key and CloudStorage key can also be omitted and the API key at the default location `TURNKEY_API_KEY` will be used. If an API key is omitted and a CloudStorage key is specified an API key at that location will be used. Refer to the [argument-usage](#argument-usage) section for a full explanation. A stamper that was originally used to just view Cloud Storage values can later be used for signing by using the `.setSigningKey()` function.
145145

146146
```ts
147147
import TelegramCloudStorageStamper, {

packages/telegram-cloud-storage-stamper/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@turnkey/telegram-cloud-storage-stamper",
3-
"version": "1.0.0",
3+
"version": "1.0.1",
44
"main": "./dist/index.js",
55
"module": "./dist/index.mjs",
66
"exports": {

packages/telegram-cloud-storage-stamper/src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export type CloudStorageAPIKey = {
2323
};
2424

2525
// Constant for default key name
26-
const DEFAULT_TURNKEY_CLOUD_STORAGE_KEY = "@turnkey/TURNKEY_API_KEY";
26+
const DEFAULT_TURNKEY_CLOUD_STORAGE_KEY = "TURNKEY_API_KEY";
2727

2828
/**
2929
* Stamper to use within a `TurnkeyClient`

0 commit comments

Comments
 (0)