@thirdweb-dev/service-utils 0.8.8-nightly-6f2f92ddea333679ff1962b2df0da4ecf43be966-20250209092734 → 0.8.8-nightly-c86e13b5225ae9c8759efade7aeb9936e990eae8-20250210000328
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.
- package/dist/cjs/cf-worker/usageV2.js +2 -0
- package/dist/cjs/cf-worker/usageV2.js.map +1 -1
- package/dist/esm/cf-worker/usageV2.js +2 -0
- package/dist/esm/cf-worker/usageV2.js.map +1 -1
- package/dist/types/cf-worker/usageV2.d.ts +6 -2
- package/dist/types/cf-worker/usageV2.d.ts.map +1 -1
- package/dist/types/core/usageV2.d.ts +7 -5
- package/dist/types/core/usageV2.d.ts.map +1 -1
- package/package.json +1 -1
@@ -9,6 +9,8 @@ exports.sendUsageV2Events = sendUsageV2Events;
|
|
9
9
|
* - thirdwebClientId: for public clients (MUST be the user's project)
|
10
10
|
* - thirdwebSecretKey: for public clients (MUST be the user's project)
|
11
11
|
*
|
12
|
+
* NOTE: `team_id` is required if `serviceKey` is provided.
|
13
|
+
*
|
12
14
|
* This method may throw. To call this non-blocking:
|
13
15
|
* ```ts
|
14
16
|
* void sendUsageV2Events(...).catch((e) => console.error(e))
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"usageV2.js","sourceRoot":"","sources":["../../../src/cf-worker/usageV2.ts"],"names":[],"mappings":";;
|
1
|
+
{"version":3,"file":"usageV2.js","sourceRoot":"","sources":["../../../src/cf-worker/usageV2.ts"],"names":[],"mappings":";;AA8BA,8CAwCC;AAvDD;;;;;;;;;;;;;;GAcG;AACI,KAAK,UAAU,iBAAiB,CACrC,MAEwB,EACxB,OAAU;IAEV,MAAM,OAAO,GACX,OAAO,CAAC,WAAW,KAAK,YAAY;QAClC,CAAC,CAAC,wBAAwB;QAC1B,CAAC,CAAC,4BAA4B,CAAC;IAEnC,oEAAoE;IACpE,IAAI,GAAW,CAAC;IAChB,MAAM,OAAO,GAAgB,EAAE,cAAc,EAAE,kBAAkB,EAAE,CAAC;IAEpE,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC;QACvB,GAAG,GAAG,GAAG,OAAO,aAAa,OAAO,CAAC,MAAM,EAAE,CAAC;QAC9C,OAAO,CAAC,mBAAmB,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC;IACpD,CAAC;SAAM,IAAI,OAAO,CAAC,iBAAiB,EAAE,CAAC;QACrC,GAAG,GAAG,GAAG,OAAO,aAAa,OAAO,CAAC,MAAM,SAAS,CAAC;QACrD,OAAO,CAAC,cAAc,CAAC,GAAG,OAAO,CAAC,iBAAiB,CAAC;IACtD,CAAC;SAAM,IAAI,OAAO,CAAC,gBAAgB,EAAE,CAAC;QACpC,GAAG,GAAG,GAAG,OAAO,aAAa,OAAO,CAAC,MAAM,SAAS,CAAC;QACrD,OAAO,CAAC,aAAa,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC;IACpD,CAAC;SAAM,CAAC;QACN,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC,CAAC;IAClE,CAAC;IAED,MAAM,IAAI,GAAG,MAAM,KAAK,CAAC,GAAG,EAAE;QAC5B,MAAM,EAAE,MAAM;QACd,OAAO;QACP,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;KACjC,CAAC,CAAC;IAEH,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CACb,iCAAiC,IAAI,CAAC,MAAM,KAAK,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,CACrE,CAAC;IACJ,CAAC;IACD,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC;AACtB,CAAC"}
|
@@ -6,6 +6,8 @@
|
|
6
6
|
* - thirdwebClientId: for public clients (MUST be the user's project)
|
7
7
|
* - thirdwebSecretKey: for public clients (MUST be the user's project)
|
8
8
|
*
|
9
|
+
* NOTE: `team_id` is required if `serviceKey` is provided.
|
10
|
+
*
|
9
11
|
* This method may throw. To call this non-blocking:
|
10
12
|
* ```ts
|
11
13
|
* void sendUsageV2Events(...).catch((e) => console.error(e))
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"usageV2.js","sourceRoot":"","sources":["../../../src/cf-worker/usageV2.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"usageV2.js","sourceRoot":"","sources":["../../../src/cf-worker/usageV2.ts"],"names":[],"mappings":"AAeA;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,MAEwB,EACxB,OAAU;IAEV,MAAM,OAAO,GACX,OAAO,CAAC,WAAW,KAAK,YAAY;QAClC,CAAC,CAAC,wBAAwB;QAC1B,CAAC,CAAC,4BAA4B,CAAC;IAEnC,oEAAoE;IACpE,IAAI,GAAW,CAAC;IAChB,MAAM,OAAO,GAAgB,EAAE,cAAc,EAAE,kBAAkB,EAAE,CAAC;IAEpE,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC;QACvB,GAAG,GAAG,GAAG,OAAO,aAAa,OAAO,CAAC,MAAM,EAAE,CAAC;QAC9C,OAAO,CAAC,mBAAmB,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC;IACpD,CAAC;SAAM,IAAI,OAAO,CAAC,iBAAiB,EAAE,CAAC;QACrC,GAAG,GAAG,GAAG,OAAO,aAAa,OAAO,CAAC,MAAM,SAAS,CAAC;QACrD,OAAO,CAAC,cAAc,CAAC,GAAG,OAAO,CAAC,iBAAiB,CAAC;IACtD,CAAC;SAAM,IAAI,OAAO,CAAC,gBAAgB,EAAE,CAAC;QACpC,GAAG,GAAG,GAAG,OAAO,aAAa,OAAO,CAAC,MAAM,SAAS,CAAC;QACrD,OAAO,CAAC,aAAa,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC;IACpD,CAAC;SAAM,CAAC;QACN,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC,CAAC;IAClE,CAAC;IAED,MAAM,IAAI,GAAG,MAAM,KAAK,CAAC,GAAG,EAAE;QAC5B,MAAM,EAAE,MAAM;QACd,OAAO;QACP,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;KACjC,CAAC,CAAC;IAEH,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CACb,iCAAiC,IAAI,CAAC,MAAM,KAAK,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,CACrE,CAAC;IACJ,CAAC;IACD,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC;AACtB,CAAC"}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type { UsageV2Event, UsageV2Source } from "../core/usageV2.js";
|
1
|
+
import type { ClientUsageV2Event, UsageV2Event, UsageV2Source } from "../core/usageV2.js";
|
2
2
|
type UsageV2Options = {
|
3
3
|
environment: "development" | "production";
|
4
4
|
source: UsageV2Source;
|
@@ -23,11 +23,15 @@ type UsageV2Options = {
|
|
23
23
|
* - thirdwebClientId: for public clients (MUST be the user's project)
|
24
24
|
* - thirdwebSecretKey: for public clients (MUST be the user's project)
|
25
25
|
*
|
26
|
+
* NOTE: `team_id` is required if `serviceKey` is provided.
|
27
|
+
*
|
26
28
|
* This method may throw. To call this non-blocking:
|
27
29
|
* ```ts
|
28
30
|
* void sendUsageV2Events(...).catch((e) => console.error(e))
|
29
31
|
* ```
|
30
32
|
*/
|
31
|
-
export declare function sendUsageV2Events(events:
|
33
|
+
export declare function sendUsageV2Events<T extends UsageV2Options>(events: T extends {
|
34
|
+
serviceKey: string;
|
35
|
+
} ? UsageV2Event[] : ClientUsageV2Event[], options: T): Promise<void>;
|
32
36
|
export {};
|
33
37
|
//# sourceMappingURL=usageV2.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"usageV2.d.ts","sourceRoot":"","sources":["../../../src/cf-worker/usageV2.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
1
|
+
{"version":3,"file":"usageV2.d.ts","sourceRoot":"","sources":["../../../src/cf-worker/usageV2.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,EAClB,YAAY,EACZ,aAAa,EACd,MAAM,oBAAoB,CAAC;AAE5B,KAAK,cAAc,GAAG;IACpB,WAAW,EAAE,aAAa,GAAG,YAAY,CAAC;IAC1C,MAAM,EAAE,aAAa,CAAC;CACvB,GAAG,CACA;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,gBAAgB,CAAC,EAAE,KAAK,CAAC;IAAC,iBAAiB,CAAC,EAAE,KAAK,CAAA;CAAE,GAC3E;IAAE,UAAU,CAAC,EAAE,KAAK,CAAC;IAAC,gBAAgB,EAAE,MAAM,CAAC;IAAC,iBAAiB,CAAC,EAAE,KAAK,CAAA;CAAE,GAC3E;IAAE,UAAU,CAAC,EAAE,KAAK,CAAC;IAAC,gBAAgB,CAAC,EAAE,KAAK,CAAC;IAAC,iBAAiB,EAAE,MAAM,CAAA;CAAE,CAC9E,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,iBAAiB,CAAC,CAAC,SAAS,cAAc,EAC9D,MAAM,EAAE,CAAC,SAAS;IAAE,UAAU,EAAE,MAAM,CAAA;CAAE,GACpC,YAAY,EAAE,GACd,kBAAkB,EAAE,EACxB,OAAO,EAAE,CAAC,GACT,OAAO,CAAC,IAAI,CAAC,CAmCf"}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
export declare const USAGE_V2_SOURCES: readonly ["bundler", "engine", "insight", "nebula", "rpc", "sdk", "storage", "wallet"];
|
2
2
|
export type UsageV2Source = (typeof USAGE_V2_SOURCES)[number];
|
3
3
|
export declare function getTopicName(source: UsageV2Source): string;
|
4
|
-
export interface
|
4
|
+
export interface ClientUsageV2Event {
|
5
5
|
/**
|
6
6
|
* A unique identifier for the event. Defaults to a random UUID.
|
7
7
|
* Useful if your service retries sending events.
|
@@ -15,10 +15,6 @@ export interface UsageV2Event {
|
|
15
15
|
* The action of the event. Example: "upload"
|
16
16
|
*/
|
17
17
|
action: string;
|
18
|
-
/**
|
19
|
-
* The team ID.
|
20
|
-
*/
|
21
|
-
team_id: string;
|
22
18
|
/**
|
23
19
|
* The project ID, if available.
|
24
20
|
*/
|
@@ -53,4 +49,10 @@ export interface UsageV2Event {
|
|
53
49
|
*/
|
54
50
|
[key: string]: boolean | number | string | Date | null | undefined;
|
55
51
|
}
|
52
|
+
export interface UsageV2Event extends ClientUsageV2Event {
|
53
|
+
/**
|
54
|
+
* The team ID.
|
55
|
+
*/
|
56
|
+
team_id: string;
|
57
|
+
}
|
56
58
|
//# sourceMappingURL=usageV2.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"usageV2.d.ts","sourceRoot":"","sources":["../../../src/core/usageV2.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,wFASnB,CAAC;AACX,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC;AAC9D,wBAAgB,YAAY,CAAC,MAAM,EAAE,aAAa,UAEjD;AAED,MAAM,WAAW,
|
1
|
+
{"version":3,"file":"usageV2.d.ts","sourceRoot":"","sources":["../../../src/core/usageV2.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,wFASnB,CAAC;AACX,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC;AAC9D,wBAAgB,YAAY,CAAC,MAAM,EAAE,aAAa,UAEjD;AAED,MAAM,WAAW,kBAAkB;IACjC;;;OAGG;IACH,EAAE,CAAC,EAAE,GAAG,MAAM,IAAI,MAAM,IAAI,MAAM,IAAI,MAAM,IAAI,MAAM,EAAE,CAAC;IACzD;;OAEG;IACH,UAAU,CAAC,EAAE,IAAI,CAAC;IAClB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;CACpE;AAED,MAAM,WAAW,YAAa,SAAQ,kBAAkB;IACtD;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@thirdweb-dev/service-utils",
|
3
|
-
"version": "0.8.8-nightly-
|
3
|
+
"version": "0.8.8-nightly-c86e13b5225ae9c8759efade7aeb9936e990eae8-20250210000328",
|
4
4
|
"type": "module",
|
5
5
|
"main": "dist/cjs/index.js",
|
6
6
|
"module": "dist/esm/index.js",
|