@oino-ts/types 1.0.7 → 1.0.8

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.
@@ -4,12 +4,15 @@ import { type OINONoSqlEntry } from "@oino-ts/nosql";
4
4
  /**
5
5
  * Azure Table Storage implementation of `OINONoSql`.
6
6
  *
7
- * Authenticates using an Azure Storage connection string. Connection parameters map as:
8
- * - `params.url` → table service endpoint, e.g. `https://<account>.table.core.windows.net`
9
- * - `params.table` → table name
10
- * - `params.connectionStr` Azure Storage connection string (e.g. `DefaultEndpointsProtocol=https;AccountName=...`)
7
+ * Authenticates using either an Azure Storage connection string or a table
8
+ * service endpoint URL combined with a managed identity client id. Connection
9
+ * parameters map as:
10
+ * - `credentials.url` table service endpoint, e.g. `https://<account>.table.core.windows.net`
11
+ * - `credentials.connectionStr` → Azure Storage connection string (e.g. `DefaultEndpointsProtocol=https;AccountName=...`)
12
+ * - `credentials.clientId` → (optional) managed identity client id used with `credentials.url`
13
+ * - `params.table` → table name
11
14
  *
12
- * Register and use via the factory:
15
+ * Register and use via the factory with a connection string:
13
16
  * ```ts
14
17
  * import { OINONoSqlFactory } from "@oino-ts/nosql"
15
18
  * import { OINONoSqlAzureTable } from "@oino-ts/nosql-azure"
@@ -17,10 +20,9 @@ import { type OINONoSqlEntry } from "@oino-ts/nosql";
17
20
  * OINONoSqlFactory.registerNoSql("OINONoSqlAzureTable", OINONoSqlAzureTable)
18
21
  *
19
22
  * const nosql = await OINONoSqlFactory.createNoSql({
20
- * type: "OINONoSqlAzureTable",
21
- * url: "https://myaccount.table.core.windows.net",
22
- * table: "myTable",
23
- * connectionStr: process.env.AZURE_STORAGE_CONNECTION_STRING
23
+ * type: "OINONoSqlAzureTable",
24
+ * table: "myTable",
25
+ * credentials: { connectionStr: process.env.AZURE_STORAGE_CONNECTION_STRING }
24
26
  * })
25
27
  * const api = await OINONoSqlFactory.createApi(nosql, {
26
28
  * apiName: "entities",
@@ -28,6 +30,18 @@ import { type OINONoSqlEntry } from "@oino-ts/nosql";
28
30
  * })
29
31
  * ```
30
32
  *
33
+ * Or with a service endpoint URL and a managed identity client id:
34
+ * ```ts
35
+ * const nosql = await OINONoSqlFactory.createNoSql({
36
+ * type: "OINONoSqlAzureTable",
37
+ * table: "myTable",
38
+ * credentials: {
39
+ * url: "https://myaccount.table.core.windows.net",
40
+ * clientId: process.env.AZURE_MANAGED_IDENTITY_CLIENT_ID
41
+ * }
42
+ * })
43
+ * ```
44
+ *
31
45
  * ## Static partition key
32
46
  *
33
47
  * Set `staticPartitionKey` in the params to scope all operations to a fixed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oino-ts/types",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "OINO TS package for types.",
5
5
  "author": "Matias Kiviniemi (pragmatta)",
6
6
  "license": "MPL-2.0",