@trigger.dev/sdk 3.3.1 → 3.3.3
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/commonjs/v3/auth.d.ts +127 -2
- package/dist/commonjs/v3/auth.js +134 -0
- package/dist/commonjs/v3/auth.js.map +1 -1
- package/dist/commonjs/version.js +1 -1
- package/dist/esm/v3/auth.d.ts +127 -2
- package/dist/esm/v3/auth.js +134 -0
- package/dist/esm/v3/auth.js.map +1 -1
- package/dist/esm/version.js +1 -1
- package/package.json +2 -2
|
@@ -20,9 +20,13 @@ export declare function configure(options: ApiClientConfiguration): void;
|
|
|
20
20
|
export declare const auth: {
|
|
21
21
|
configure: typeof configure;
|
|
22
22
|
createPublicToken: typeof createPublicToken;
|
|
23
|
+
createTriggerPublicToken: typeof createTriggerPublicToken;
|
|
24
|
+
createBatchTriggerPublicToken: typeof createBatchTriggerPublicToken;
|
|
23
25
|
withAuth: typeof withAuth;
|
|
26
|
+
withPublicToken: typeof withPublicToken;
|
|
27
|
+
withTriggerPublicToken: typeof withTriggerPublicToken;
|
|
28
|
+
withBatchTriggerPublicToken: typeof withBatchTriggerPublicToken;
|
|
24
29
|
};
|
|
25
|
-
type PublicTokenPermissionAction = "read" | "write";
|
|
26
30
|
type PublicTokenPermissionProperties = {
|
|
27
31
|
/**
|
|
28
32
|
* Grant access to specific tasks
|
|
@@ -42,7 +46,23 @@ type PublicTokenPermissionProperties = {
|
|
|
42
46
|
batch?: string | string[];
|
|
43
47
|
};
|
|
44
48
|
export type PublicTokenPermissions = {
|
|
45
|
-
|
|
49
|
+
read?: PublicTokenPermissionProperties;
|
|
50
|
+
/**
|
|
51
|
+
* @deprecated use trigger instead
|
|
52
|
+
*/
|
|
53
|
+
write?: PublicTokenPermissionProperties;
|
|
54
|
+
/**
|
|
55
|
+
* Use auth.createTriggerPublicToken
|
|
56
|
+
*/
|
|
57
|
+
trigger?: {
|
|
58
|
+
tasks: string | string[];
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* Use auth.createBatchTriggerPublicToken
|
|
62
|
+
*/
|
|
63
|
+
batchTrigger?: {
|
|
64
|
+
tasks: string | string[];
|
|
65
|
+
};
|
|
46
66
|
};
|
|
47
67
|
export type CreatePublicTokenOptions = {
|
|
48
68
|
/**
|
|
@@ -92,6 +112,111 @@ export type CreatePublicTokenOptions = {
|
|
|
92
112
|
* ```
|
|
93
113
|
*/
|
|
94
114
|
declare function createPublicToken(options?: CreatePublicTokenOptions): Promise<string>;
|
|
115
|
+
/**
|
|
116
|
+
* Executes a function with a public token, providing temporary access permissions.
|
|
117
|
+
*
|
|
118
|
+
* @param options - Options for creating the public token.
|
|
119
|
+
* @param fn - The asynchronous function to be executed with the public token.
|
|
120
|
+
*/
|
|
121
|
+
declare function withPublicToken(options: CreatePublicTokenOptions, fn: () => Promise<void>): Promise<void>;
|
|
122
|
+
export type CreateTriggerTokenOptions = {
|
|
123
|
+
/**
|
|
124
|
+
* The expiration time for the token. This can be a number representing the time in milliseconds, a `Date` object, or a string.
|
|
125
|
+
*
|
|
126
|
+
* @example
|
|
127
|
+
*
|
|
128
|
+
* ```typescript
|
|
129
|
+
* expirationTime: "1h"
|
|
130
|
+
* ```
|
|
131
|
+
*/
|
|
132
|
+
expirationTime?: number | Date | string;
|
|
133
|
+
/**
|
|
134
|
+
* Whether the token can be used multiple times. By default trigger tokens are one-time use.
|
|
135
|
+
* @default false
|
|
136
|
+
*/
|
|
137
|
+
multipleUse?: boolean;
|
|
138
|
+
};
|
|
139
|
+
/**
|
|
140
|
+
* Creates a one-time use token to trigger a specific task.
|
|
141
|
+
*
|
|
142
|
+
* @param task - The task ID or an array of task IDs that the token should allow triggering.
|
|
143
|
+
* @param options - Options for creating the one-time use token.
|
|
144
|
+
* @returns A promise that resolves to a string representing the generated one-time use token.
|
|
145
|
+
*
|
|
146
|
+
* @example
|
|
147
|
+
* Create a one-time use public token that allows triggering a specific task:
|
|
148
|
+
*
|
|
149
|
+
* ```ts
|
|
150
|
+
* import { auth } from "@trigger.dev/sdk/v3";
|
|
151
|
+
*
|
|
152
|
+
* const token = await auth.createTriggerPublicToken("my-task");
|
|
153
|
+
* ```
|
|
154
|
+
*
|
|
155
|
+
* @example You can also create a one-time use token that allows triggering multiple tasks:
|
|
156
|
+
*
|
|
157
|
+
* ```ts
|
|
158
|
+
* import { auth } from "@trigger.dev/sdk/v3";
|
|
159
|
+
*
|
|
160
|
+
* const token = await auth.createTriggerPublicToken(["task1", "task2"]);
|
|
161
|
+
* ```
|
|
162
|
+
*
|
|
163
|
+
* @example You can also create a one-time use token that allows triggering a task with a specific expiration time:
|
|
164
|
+
*
|
|
165
|
+
* ```ts
|
|
166
|
+
* import { auth } from "@trigger.dev/sdk/v3";
|
|
167
|
+
*
|
|
168
|
+
* const token = await auth.createTriggerPublicToken("my-task", { expirationTime: "1h" });
|
|
169
|
+
* ```
|
|
170
|
+
*/
|
|
171
|
+
declare function createTriggerPublicToken(task: string | string[], options?: CreateTriggerTokenOptions): Promise<string>;
|
|
172
|
+
/**
|
|
173
|
+
* Executes a function with a one-time use token that allows triggering a specific task.
|
|
174
|
+
*
|
|
175
|
+
* @param task - The task ID or an array of task IDs that the token should allow triggering.
|
|
176
|
+
* @param options - Options for creating the one-time use token.
|
|
177
|
+
* @param fn - The asynchronous function to be executed with the one-time use token.
|
|
178
|
+
*/
|
|
179
|
+
declare function withTriggerPublicToken(task: string | string[], options: CreateTriggerTokenOptions | undefined, fn: () => Promise<void>): Promise<void>;
|
|
180
|
+
/**
|
|
181
|
+
* Creates a one-time use token to batch trigger a specific task or tasks.
|
|
182
|
+
*
|
|
183
|
+
* @param task - The task ID or an array of task IDs that the token should allow triggering.
|
|
184
|
+
* @param options - Options for creating the one-time use token.
|
|
185
|
+
* @returns A promise that resolves to a string representing the generated one-time use token.
|
|
186
|
+
*
|
|
187
|
+
* @example
|
|
188
|
+
*
|
|
189
|
+
* ```ts
|
|
190
|
+
* import { auth } from "@trigger.dev/sdk/v3";
|
|
191
|
+
*
|
|
192
|
+
* const token = await auth.createBatchTriggerPublicToken("my-task");
|
|
193
|
+
* ```
|
|
194
|
+
*
|
|
195
|
+
* @example You can also create a one-time use token that allows batch triggering multiple tasks:
|
|
196
|
+
*
|
|
197
|
+
* ```ts
|
|
198
|
+
* import { auth } from "@trigger.dev/sdk/v3";
|
|
199
|
+
*
|
|
200
|
+
* const token = await auth.createBatchTriggerPublicToken(["task1", "task2"]);
|
|
201
|
+
* ```
|
|
202
|
+
*
|
|
203
|
+
* @example You can also create a one-time use token that allows batch triggering a task with a specific expiration time:
|
|
204
|
+
*
|
|
205
|
+
* ```ts
|
|
206
|
+
* import { auth } from "@trigger.dev/sdk/v3";
|
|
207
|
+
*
|
|
208
|
+
* const token = await auth.createBatchTriggerPublicToken("my-task", { expirationTime: "1h" });
|
|
209
|
+
* ```
|
|
210
|
+
*/
|
|
211
|
+
declare function createBatchTriggerPublicToken(task: string | string[], options?: CreateTriggerTokenOptions): Promise<string>;
|
|
212
|
+
/**
|
|
213
|
+
* Executes a function with a one-time use token that allows triggering a specific task.
|
|
214
|
+
*
|
|
215
|
+
* @param task - The task ID or an array of task IDs that the token should allow triggering.
|
|
216
|
+
* @param options - Options for creating the one-time use token.
|
|
217
|
+
* @param fn - The asynchronous function to be executed with the one-time use token.
|
|
218
|
+
*/
|
|
219
|
+
declare function withBatchTriggerPublicToken(task: string | string[], options: CreateTriggerTokenOptions | undefined, fn: () => Promise<void>): Promise<void>;
|
|
95
220
|
/**
|
|
96
221
|
* Executes a provided asynchronous function with a specified API client configuration.
|
|
97
222
|
*
|
package/dist/commonjs/v3/auth.js
CHANGED
|
@@ -27,7 +27,12 @@ function configure(options) {
|
|
|
27
27
|
exports.auth = {
|
|
28
28
|
configure,
|
|
29
29
|
createPublicToken,
|
|
30
|
+
createTriggerPublicToken,
|
|
31
|
+
createBatchTriggerPublicToken,
|
|
30
32
|
withAuth,
|
|
33
|
+
withPublicToken,
|
|
34
|
+
withTriggerPublicToken,
|
|
35
|
+
withBatchTriggerPublicToken,
|
|
31
36
|
};
|
|
32
37
|
/**
|
|
33
38
|
* Creates a public token using the provided options.
|
|
@@ -62,6 +67,135 @@ async function createPublicToken(options) {
|
|
|
62
67
|
expirationTime: options?.expirationTime,
|
|
63
68
|
});
|
|
64
69
|
}
|
|
70
|
+
/**
|
|
71
|
+
* Executes a function with a public token, providing temporary access permissions.
|
|
72
|
+
*
|
|
73
|
+
* @param options - Options for creating the public token.
|
|
74
|
+
* @param fn - The asynchronous function to be executed with the public token.
|
|
75
|
+
*/
|
|
76
|
+
async function withPublicToken(options, fn) {
|
|
77
|
+
const token = await createPublicToken(options);
|
|
78
|
+
await withAuth({ accessToken: token }, fn);
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Creates a one-time use token to trigger a specific task.
|
|
82
|
+
*
|
|
83
|
+
* @param task - The task ID or an array of task IDs that the token should allow triggering.
|
|
84
|
+
* @param options - Options for creating the one-time use token.
|
|
85
|
+
* @returns A promise that resolves to a string representing the generated one-time use token.
|
|
86
|
+
*
|
|
87
|
+
* @example
|
|
88
|
+
* Create a one-time use public token that allows triggering a specific task:
|
|
89
|
+
*
|
|
90
|
+
* ```ts
|
|
91
|
+
* import { auth } from "@trigger.dev/sdk/v3";
|
|
92
|
+
*
|
|
93
|
+
* const token = await auth.createTriggerPublicToken("my-task");
|
|
94
|
+
* ```
|
|
95
|
+
*
|
|
96
|
+
* @example You can also create a one-time use token that allows triggering multiple tasks:
|
|
97
|
+
*
|
|
98
|
+
* ```ts
|
|
99
|
+
* import { auth } from "@trigger.dev/sdk/v3";
|
|
100
|
+
*
|
|
101
|
+
* const token = await auth.createTriggerPublicToken(["task1", "task2"]);
|
|
102
|
+
* ```
|
|
103
|
+
*
|
|
104
|
+
* @example You can also create a one-time use token that allows triggering a task with a specific expiration time:
|
|
105
|
+
*
|
|
106
|
+
* ```ts
|
|
107
|
+
* import { auth } from "@trigger.dev/sdk/v3";
|
|
108
|
+
*
|
|
109
|
+
* const token = await auth.createTriggerPublicToken("my-task", { expirationTime: "1h" });
|
|
110
|
+
* ```
|
|
111
|
+
*/
|
|
112
|
+
async function createTriggerPublicToken(task, options) {
|
|
113
|
+
const apiClient = v3_1.apiClientManager.clientOrThrow();
|
|
114
|
+
const claims = await apiClient.generateJWTClaims();
|
|
115
|
+
return await (0, v3_2.generateJWT)({
|
|
116
|
+
secretKey: apiClient.accessToken,
|
|
117
|
+
payload: {
|
|
118
|
+
...claims,
|
|
119
|
+
otu: typeof options?.multipleUse === "boolean" ? !options.multipleUse : true,
|
|
120
|
+
scopes: flattenScopes({
|
|
121
|
+
trigger: {
|
|
122
|
+
tasks: task,
|
|
123
|
+
},
|
|
124
|
+
}),
|
|
125
|
+
},
|
|
126
|
+
expirationTime: options?.expirationTime,
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Executes a function with a one-time use token that allows triggering a specific task.
|
|
131
|
+
*
|
|
132
|
+
* @param task - The task ID or an array of task IDs that the token should allow triggering.
|
|
133
|
+
* @param options - Options for creating the one-time use token.
|
|
134
|
+
* @param fn - The asynchronous function to be executed with the one-time use token.
|
|
135
|
+
*/
|
|
136
|
+
async function withTriggerPublicToken(task, options = {}, fn) {
|
|
137
|
+
const token = await createTriggerPublicToken(task, options);
|
|
138
|
+
await withAuth({ accessToken: token }, fn);
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Creates a one-time use token to batch trigger a specific task or tasks.
|
|
142
|
+
*
|
|
143
|
+
* @param task - The task ID or an array of task IDs that the token should allow triggering.
|
|
144
|
+
* @param options - Options for creating the one-time use token.
|
|
145
|
+
* @returns A promise that resolves to a string representing the generated one-time use token.
|
|
146
|
+
*
|
|
147
|
+
* @example
|
|
148
|
+
*
|
|
149
|
+
* ```ts
|
|
150
|
+
* import { auth } from "@trigger.dev/sdk/v3";
|
|
151
|
+
*
|
|
152
|
+
* const token = await auth.createBatchTriggerPublicToken("my-task");
|
|
153
|
+
* ```
|
|
154
|
+
*
|
|
155
|
+
* @example You can also create a one-time use token that allows batch triggering multiple tasks:
|
|
156
|
+
*
|
|
157
|
+
* ```ts
|
|
158
|
+
* import { auth } from "@trigger.dev/sdk/v3";
|
|
159
|
+
*
|
|
160
|
+
* const token = await auth.createBatchTriggerPublicToken(["task1", "task2"]);
|
|
161
|
+
* ```
|
|
162
|
+
*
|
|
163
|
+
* @example You can also create a one-time use token that allows batch triggering a task with a specific expiration time:
|
|
164
|
+
*
|
|
165
|
+
* ```ts
|
|
166
|
+
* import { auth } from "@trigger.dev/sdk/v3";
|
|
167
|
+
*
|
|
168
|
+
* const token = await auth.createBatchTriggerPublicToken("my-task", { expirationTime: "1h" });
|
|
169
|
+
* ```
|
|
170
|
+
*/
|
|
171
|
+
async function createBatchTriggerPublicToken(task, options) {
|
|
172
|
+
const apiClient = v3_1.apiClientManager.clientOrThrow();
|
|
173
|
+
const claims = await apiClient.generateJWTClaims();
|
|
174
|
+
return await (0, v3_2.generateJWT)({
|
|
175
|
+
secretKey: apiClient.accessToken,
|
|
176
|
+
payload: {
|
|
177
|
+
...claims,
|
|
178
|
+
otu: typeof options?.multipleUse === "boolean" ? !options.multipleUse : true,
|
|
179
|
+
scopes: flattenScopes({
|
|
180
|
+
batchTrigger: {
|
|
181
|
+
tasks: task,
|
|
182
|
+
},
|
|
183
|
+
}),
|
|
184
|
+
},
|
|
185
|
+
expirationTime: options?.expirationTime,
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* Executes a function with a one-time use token that allows triggering a specific task.
|
|
190
|
+
*
|
|
191
|
+
* @param task - The task ID or an array of task IDs that the token should allow triggering.
|
|
192
|
+
* @param options - Options for creating the one-time use token.
|
|
193
|
+
* @param fn - The asynchronous function to be executed with the one-time use token.
|
|
194
|
+
*/
|
|
195
|
+
async function withBatchTriggerPublicToken(task, options = {}, fn) {
|
|
196
|
+
const token = await createBatchTriggerPublicToken(task, options);
|
|
197
|
+
await withAuth({ accessToken: token }, fn);
|
|
198
|
+
}
|
|
65
199
|
/**
|
|
66
200
|
* Executes a provided asynchronous function with a specified API client configuration.
|
|
67
201
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../src/v3/auth.ts"],"names":[],"mappings":";;;AAoBA,8BAEC;AAtBD,6CAAqF;AACrF,6CAA2E;AAE3E;;;;;;;;;;;;;;;;GAgBG;AACH,SAAgB,SAAS,CAAC,OAA+B;IACvD,qBAAgB,CAAC,+BAA+B,CAAC,OAAO,CAAC,CAAC;AAC5D,CAAC;AAEY,QAAA,IAAI,GAAG;IAClB,SAAS;IACT,iBAAiB;IACjB,QAAQ;
|
|
1
|
+
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../src/v3/auth.ts"],"names":[],"mappings":";;;AAoBA,8BAEC;AAtBD,6CAAqF;AACrF,6CAA2E;AAE3E;;;;;;;;;;;;;;;;GAgBG;AACH,SAAgB,SAAS,CAAC,OAA+B;IACvD,qBAAgB,CAAC,+BAA+B,CAAC,OAAO,CAAC,CAAC;AAC5D,CAAC;AAEY,QAAA,IAAI,GAAG;IAClB,SAAS;IACT,iBAAiB;IACjB,wBAAwB;IACxB,6BAA6B;IAC7B,QAAQ;IACR,eAAe;IACf,sBAAsB;IACtB,2BAA2B;CAC5B,CAAC;AA2EF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,KAAK,UAAU,iBAAiB,CAAC,OAAkC;IACjE,MAAM,SAAS,GAAG,qBAAgB,CAAC,aAAa,EAAE,CAAC;IAEnD,MAAM,MAAM,GAAG,MAAM,SAAS,CAAC,iBAAiB,EAAE,CAAC;IAEnD,OAAO,MAAM,IAAA,gBAAoB,EAAC;QAChC,SAAS,EAAE,SAAS,CAAC,WAAW;QAChC,OAAO,EAAE;YACP,GAAG,MAAM;YACT,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,aAAa,CAAC,OAAO,C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AAI,UAAU,EAAE,CAAC;gBAClD,oBAAoB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YACpC,CAAC;iBAAM,IAAI,OAAO,UAAU,KAAK,QAAQ,EAAE,CAAC;gBAC1C,KAAK,MAAM,CAAC,QAAQ,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC;oBAC3D,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;wBACzB,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;4BACzB,oBAAoB,CAAC,IAAI,CAAC,GAAG,MAAM,IAAI,QAAQ,IAAI,IAAI,EAAE,CAAC,CAAC;wBAC7D,CAAC;oBACH,CAAC;yBAAM,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;wBACrC,oBAAoB,CAAC,IAAI,CAAC,GAAG,MAAM,IAAI,QAAQ,IAAI,KAAK,EAAE,CAAC,CAAC;oBAC9D,CAAC;yBAAM,IAAI,OAAO,KAAK,KAAK,SAAS,IAAI,KAAK,EAAE,CAAC;wBAC/C,oBAAoB,CAAC,IAAI,CAAC,GAAG,MAAM,IAAI,QAAQ,EAAE,CAAC,CAAC;oBACrD,CAAC;gBACH,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,oBAAoB,CAAC;AAC9B,CAAC"}
|
package/dist/commonjs/version.js
CHANGED
package/dist/esm/v3/auth.d.ts
CHANGED
|
@@ -20,9 +20,13 @@ export declare function configure(options: ApiClientConfiguration): void;
|
|
|
20
20
|
export declare const auth: {
|
|
21
21
|
configure: typeof configure;
|
|
22
22
|
createPublicToken: typeof createPublicToken;
|
|
23
|
+
createTriggerPublicToken: typeof createTriggerPublicToken;
|
|
24
|
+
createBatchTriggerPublicToken: typeof createBatchTriggerPublicToken;
|
|
23
25
|
withAuth: typeof withAuth;
|
|
26
|
+
withPublicToken: typeof withPublicToken;
|
|
27
|
+
withTriggerPublicToken: typeof withTriggerPublicToken;
|
|
28
|
+
withBatchTriggerPublicToken: typeof withBatchTriggerPublicToken;
|
|
24
29
|
};
|
|
25
|
-
type PublicTokenPermissionAction = "read" | "write";
|
|
26
30
|
type PublicTokenPermissionProperties = {
|
|
27
31
|
/**
|
|
28
32
|
* Grant access to specific tasks
|
|
@@ -42,7 +46,23 @@ type PublicTokenPermissionProperties = {
|
|
|
42
46
|
batch?: string | string[];
|
|
43
47
|
};
|
|
44
48
|
export type PublicTokenPermissions = {
|
|
45
|
-
|
|
49
|
+
read?: PublicTokenPermissionProperties;
|
|
50
|
+
/**
|
|
51
|
+
* @deprecated use trigger instead
|
|
52
|
+
*/
|
|
53
|
+
write?: PublicTokenPermissionProperties;
|
|
54
|
+
/**
|
|
55
|
+
* Use auth.createTriggerPublicToken
|
|
56
|
+
*/
|
|
57
|
+
trigger?: {
|
|
58
|
+
tasks: string | string[];
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* Use auth.createBatchTriggerPublicToken
|
|
62
|
+
*/
|
|
63
|
+
batchTrigger?: {
|
|
64
|
+
tasks: string | string[];
|
|
65
|
+
};
|
|
46
66
|
};
|
|
47
67
|
export type CreatePublicTokenOptions = {
|
|
48
68
|
/**
|
|
@@ -92,6 +112,111 @@ export type CreatePublicTokenOptions = {
|
|
|
92
112
|
* ```
|
|
93
113
|
*/
|
|
94
114
|
declare function createPublicToken(options?: CreatePublicTokenOptions): Promise<string>;
|
|
115
|
+
/**
|
|
116
|
+
* Executes a function with a public token, providing temporary access permissions.
|
|
117
|
+
*
|
|
118
|
+
* @param options - Options for creating the public token.
|
|
119
|
+
* @param fn - The asynchronous function to be executed with the public token.
|
|
120
|
+
*/
|
|
121
|
+
declare function withPublicToken(options: CreatePublicTokenOptions, fn: () => Promise<void>): Promise<void>;
|
|
122
|
+
export type CreateTriggerTokenOptions = {
|
|
123
|
+
/**
|
|
124
|
+
* The expiration time for the token. This can be a number representing the time in milliseconds, a `Date` object, or a string.
|
|
125
|
+
*
|
|
126
|
+
* @example
|
|
127
|
+
*
|
|
128
|
+
* ```typescript
|
|
129
|
+
* expirationTime: "1h"
|
|
130
|
+
* ```
|
|
131
|
+
*/
|
|
132
|
+
expirationTime?: number | Date | string;
|
|
133
|
+
/**
|
|
134
|
+
* Whether the token can be used multiple times. By default trigger tokens are one-time use.
|
|
135
|
+
* @default false
|
|
136
|
+
*/
|
|
137
|
+
multipleUse?: boolean;
|
|
138
|
+
};
|
|
139
|
+
/**
|
|
140
|
+
* Creates a one-time use token to trigger a specific task.
|
|
141
|
+
*
|
|
142
|
+
* @param task - The task ID or an array of task IDs that the token should allow triggering.
|
|
143
|
+
* @param options - Options for creating the one-time use token.
|
|
144
|
+
* @returns A promise that resolves to a string representing the generated one-time use token.
|
|
145
|
+
*
|
|
146
|
+
* @example
|
|
147
|
+
* Create a one-time use public token that allows triggering a specific task:
|
|
148
|
+
*
|
|
149
|
+
* ```ts
|
|
150
|
+
* import { auth } from "@trigger.dev/sdk/v3";
|
|
151
|
+
*
|
|
152
|
+
* const token = await auth.createTriggerPublicToken("my-task");
|
|
153
|
+
* ```
|
|
154
|
+
*
|
|
155
|
+
* @example You can also create a one-time use token that allows triggering multiple tasks:
|
|
156
|
+
*
|
|
157
|
+
* ```ts
|
|
158
|
+
* import { auth } from "@trigger.dev/sdk/v3";
|
|
159
|
+
*
|
|
160
|
+
* const token = await auth.createTriggerPublicToken(["task1", "task2"]);
|
|
161
|
+
* ```
|
|
162
|
+
*
|
|
163
|
+
* @example You can also create a one-time use token that allows triggering a task with a specific expiration time:
|
|
164
|
+
*
|
|
165
|
+
* ```ts
|
|
166
|
+
* import { auth } from "@trigger.dev/sdk/v3";
|
|
167
|
+
*
|
|
168
|
+
* const token = await auth.createTriggerPublicToken("my-task", { expirationTime: "1h" });
|
|
169
|
+
* ```
|
|
170
|
+
*/
|
|
171
|
+
declare function createTriggerPublicToken(task: string | string[], options?: CreateTriggerTokenOptions): Promise<string>;
|
|
172
|
+
/**
|
|
173
|
+
* Executes a function with a one-time use token that allows triggering a specific task.
|
|
174
|
+
*
|
|
175
|
+
* @param task - The task ID or an array of task IDs that the token should allow triggering.
|
|
176
|
+
* @param options - Options for creating the one-time use token.
|
|
177
|
+
* @param fn - The asynchronous function to be executed with the one-time use token.
|
|
178
|
+
*/
|
|
179
|
+
declare function withTriggerPublicToken(task: string | string[], options: CreateTriggerTokenOptions | undefined, fn: () => Promise<void>): Promise<void>;
|
|
180
|
+
/**
|
|
181
|
+
* Creates a one-time use token to batch trigger a specific task or tasks.
|
|
182
|
+
*
|
|
183
|
+
* @param task - The task ID or an array of task IDs that the token should allow triggering.
|
|
184
|
+
* @param options - Options for creating the one-time use token.
|
|
185
|
+
* @returns A promise that resolves to a string representing the generated one-time use token.
|
|
186
|
+
*
|
|
187
|
+
* @example
|
|
188
|
+
*
|
|
189
|
+
* ```ts
|
|
190
|
+
* import { auth } from "@trigger.dev/sdk/v3";
|
|
191
|
+
*
|
|
192
|
+
* const token = await auth.createBatchTriggerPublicToken("my-task");
|
|
193
|
+
* ```
|
|
194
|
+
*
|
|
195
|
+
* @example You can also create a one-time use token that allows batch triggering multiple tasks:
|
|
196
|
+
*
|
|
197
|
+
* ```ts
|
|
198
|
+
* import { auth } from "@trigger.dev/sdk/v3";
|
|
199
|
+
*
|
|
200
|
+
* const token = await auth.createBatchTriggerPublicToken(["task1", "task2"]);
|
|
201
|
+
* ```
|
|
202
|
+
*
|
|
203
|
+
* @example You can also create a one-time use token that allows batch triggering a task with a specific expiration time:
|
|
204
|
+
*
|
|
205
|
+
* ```ts
|
|
206
|
+
* import { auth } from "@trigger.dev/sdk/v3";
|
|
207
|
+
*
|
|
208
|
+
* const token = await auth.createBatchTriggerPublicToken("my-task", { expirationTime: "1h" });
|
|
209
|
+
* ```
|
|
210
|
+
*/
|
|
211
|
+
declare function createBatchTriggerPublicToken(task: string | string[], options?: CreateTriggerTokenOptions): Promise<string>;
|
|
212
|
+
/**
|
|
213
|
+
* Executes a function with a one-time use token that allows triggering a specific task.
|
|
214
|
+
*
|
|
215
|
+
* @param task - The task ID or an array of task IDs that the token should allow triggering.
|
|
216
|
+
* @param options - Options for creating the one-time use token.
|
|
217
|
+
* @param fn - The asynchronous function to be executed with the one-time use token.
|
|
218
|
+
*/
|
|
219
|
+
declare function withBatchTriggerPublicToken(task: string | string[], options: CreateTriggerTokenOptions | undefined, fn: () => Promise<void>): Promise<void>;
|
|
95
220
|
/**
|
|
96
221
|
* Executes a provided asynchronous function with a specified API client configuration.
|
|
97
222
|
*
|
package/dist/esm/v3/auth.js
CHANGED
|
@@ -23,7 +23,12 @@ export function configure(options) {
|
|
|
23
23
|
export const auth = {
|
|
24
24
|
configure,
|
|
25
25
|
createPublicToken,
|
|
26
|
+
createTriggerPublicToken,
|
|
27
|
+
createBatchTriggerPublicToken,
|
|
26
28
|
withAuth,
|
|
29
|
+
withPublicToken,
|
|
30
|
+
withTriggerPublicToken,
|
|
31
|
+
withBatchTriggerPublicToken,
|
|
27
32
|
};
|
|
28
33
|
/**
|
|
29
34
|
* Creates a public token using the provided options.
|
|
@@ -58,6 +63,135 @@ async function createPublicToken(options) {
|
|
|
58
63
|
expirationTime: options?.expirationTime,
|
|
59
64
|
});
|
|
60
65
|
}
|
|
66
|
+
/**
|
|
67
|
+
* Executes a function with a public token, providing temporary access permissions.
|
|
68
|
+
*
|
|
69
|
+
* @param options - Options for creating the public token.
|
|
70
|
+
* @param fn - The asynchronous function to be executed with the public token.
|
|
71
|
+
*/
|
|
72
|
+
async function withPublicToken(options, fn) {
|
|
73
|
+
const token = await createPublicToken(options);
|
|
74
|
+
await withAuth({ accessToken: token }, fn);
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Creates a one-time use token to trigger a specific task.
|
|
78
|
+
*
|
|
79
|
+
* @param task - The task ID or an array of task IDs that the token should allow triggering.
|
|
80
|
+
* @param options - Options for creating the one-time use token.
|
|
81
|
+
* @returns A promise that resolves to a string representing the generated one-time use token.
|
|
82
|
+
*
|
|
83
|
+
* @example
|
|
84
|
+
* Create a one-time use public token that allows triggering a specific task:
|
|
85
|
+
*
|
|
86
|
+
* ```ts
|
|
87
|
+
* import { auth } from "@trigger.dev/sdk/v3";
|
|
88
|
+
*
|
|
89
|
+
* const token = await auth.createTriggerPublicToken("my-task");
|
|
90
|
+
* ```
|
|
91
|
+
*
|
|
92
|
+
* @example You can also create a one-time use token that allows triggering multiple tasks:
|
|
93
|
+
*
|
|
94
|
+
* ```ts
|
|
95
|
+
* import { auth } from "@trigger.dev/sdk/v3";
|
|
96
|
+
*
|
|
97
|
+
* const token = await auth.createTriggerPublicToken(["task1", "task2"]);
|
|
98
|
+
* ```
|
|
99
|
+
*
|
|
100
|
+
* @example You can also create a one-time use token that allows triggering a task with a specific expiration time:
|
|
101
|
+
*
|
|
102
|
+
* ```ts
|
|
103
|
+
* import { auth } from "@trigger.dev/sdk/v3";
|
|
104
|
+
*
|
|
105
|
+
* const token = await auth.createTriggerPublicToken("my-task", { expirationTime: "1h" });
|
|
106
|
+
* ```
|
|
107
|
+
*/
|
|
108
|
+
async function createTriggerPublicToken(task, options) {
|
|
109
|
+
const apiClient = apiClientManager.clientOrThrow();
|
|
110
|
+
const claims = await apiClient.generateJWTClaims();
|
|
111
|
+
return await internal_generateJWT({
|
|
112
|
+
secretKey: apiClient.accessToken,
|
|
113
|
+
payload: {
|
|
114
|
+
...claims,
|
|
115
|
+
otu: typeof options?.multipleUse === "boolean" ? !options.multipleUse : true,
|
|
116
|
+
scopes: flattenScopes({
|
|
117
|
+
trigger: {
|
|
118
|
+
tasks: task,
|
|
119
|
+
},
|
|
120
|
+
}),
|
|
121
|
+
},
|
|
122
|
+
expirationTime: options?.expirationTime,
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Executes a function with a one-time use token that allows triggering a specific task.
|
|
127
|
+
*
|
|
128
|
+
* @param task - The task ID or an array of task IDs that the token should allow triggering.
|
|
129
|
+
* @param options - Options for creating the one-time use token.
|
|
130
|
+
* @param fn - The asynchronous function to be executed with the one-time use token.
|
|
131
|
+
*/
|
|
132
|
+
async function withTriggerPublicToken(task, options = {}, fn) {
|
|
133
|
+
const token = await createTriggerPublicToken(task, options);
|
|
134
|
+
await withAuth({ accessToken: token }, fn);
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Creates a one-time use token to batch trigger a specific task or tasks.
|
|
138
|
+
*
|
|
139
|
+
* @param task - The task ID or an array of task IDs that the token should allow triggering.
|
|
140
|
+
* @param options - Options for creating the one-time use token.
|
|
141
|
+
* @returns A promise that resolves to a string representing the generated one-time use token.
|
|
142
|
+
*
|
|
143
|
+
* @example
|
|
144
|
+
*
|
|
145
|
+
* ```ts
|
|
146
|
+
* import { auth } from "@trigger.dev/sdk/v3";
|
|
147
|
+
*
|
|
148
|
+
* const token = await auth.createBatchTriggerPublicToken("my-task");
|
|
149
|
+
* ```
|
|
150
|
+
*
|
|
151
|
+
* @example You can also create a one-time use token that allows batch triggering multiple tasks:
|
|
152
|
+
*
|
|
153
|
+
* ```ts
|
|
154
|
+
* import { auth } from "@trigger.dev/sdk/v3";
|
|
155
|
+
*
|
|
156
|
+
* const token = await auth.createBatchTriggerPublicToken(["task1", "task2"]);
|
|
157
|
+
* ```
|
|
158
|
+
*
|
|
159
|
+
* @example You can also create a one-time use token that allows batch triggering a task with a specific expiration time:
|
|
160
|
+
*
|
|
161
|
+
* ```ts
|
|
162
|
+
* import { auth } from "@trigger.dev/sdk/v3";
|
|
163
|
+
*
|
|
164
|
+
* const token = await auth.createBatchTriggerPublicToken("my-task", { expirationTime: "1h" });
|
|
165
|
+
* ```
|
|
166
|
+
*/
|
|
167
|
+
async function createBatchTriggerPublicToken(task, options) {
|
|
168
|
+
const apiClient = apiClientManager.clientOrThrow();
|
|
169
|
+
const claims = await apiClient.generateJWTClaims();
|
|
170
|
+
return await internal_generateJWT({
|
|
171
|
+
secretKey: apiClient.accessToken,
|
|
172
|
+
payload: {
|
|
173
|
+
...claims,
|
|
174
|
+
otu: typeof options?.multipleUse === "boolean" ? !options.multipleUse : true,
|
|
175
|
+
scopes: flattenScopes({
|
|
176
|
+
batchTrigger: {
|
|
177
|
+
tasks: task,
|
|
178
|
+
},
|
|
179
|
+
}),
|
|
180
|
+
},
|
|
181
|
+
expirationTime: options?.expirationTime,
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Executes a function with a one-time use token that allows triggering a specific task.
|
|
186
|
+
*
|
|
187
|
+
* @param task - The task ID or an array of task IDs that the token should allow triggering.
|
|
188
|
+
* @param options - Options for creating the one-time use token.
|
|
189
|
+
* @param fn - The asynchronous function to be executed with the one-time use token.
|
|
190
|
+
*/
|
|
191
|
+
async function withBatchTriggerPublicToken(task, options = {}, fn) {
|
|
192
|
+
const token = await createBatchTriggerPublicToken(task, options);
|
|
193
|
+
await withAuth({ accessToken: token }, fn);
|
|
194
|
+
}
|
|
61
195
|
/**
|
|
62
196
|
* Executes a provided asynchronous function with a specified API client configuration.
|
|
63
197
|
*
|
package/dist/esm/v3/auth.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../src/v3/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAA+B,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACrF,OAAO,EAAE,WAAW,IAAI,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAE3E;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,SAAS,CAAC,OAA+B;IACvD,gBAAgB,CAAC,+BAA+B,CAAC,OAAO,CAAC,CAAC;AAC5D,CAAC;AAED,MAAM,CAAC,MAAM,IAAI,GAAG;IAClB,SAAS;IACT,iBAAiB;IACjB,QAAQ;
|
|
1
|
+
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../src/v3/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAA+B,gBAAgB,EAAE,MAAM,sBAAs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,EAAE,CAAC;wBACrC,oBAAoB,CAAC,IAAI,CAAC,GAAG,MAAM,IAAI,QAAQ,IAAI,KAAK,EAAE,CAAC,CAAC;oBAC9D,CAAC;yBAAM,IAAI,OAAO,KAAK,KAAK,SAAS,IAAI,KAAK,EAAE,CAAC;wBAC/C,oBAAoB,CAAC,IAAI,CAAC,GAAG,MAAM,IAAI,QAAQ,EAAE,CAAC,CAAC;oBACrD,CAAC;gBACH,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,oBAAoB,CAAC;AAC9B,CAAC"}
|
package/dist/esm/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = "3.3.
|
|
1
|
+
export const VERSION = "3.3.3";
|
|
2
2
|
//# sourceMappingURL=version.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trigger.dev/sdk",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.3",
|
|
4
4
|
"description": "trigger.dev Node.JS SDK",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"@opentelemetry/api": "1.9.0",
|
|
41
41
|
"@opentelemetry/api-logs": "0.52.1",
|
|
42
42
|
"@opentelemetry/semantic-conventions": "1.25.1",
|
|
43
|
-
"@trigger.dev/core": "3.3.
|
|
43
|
+
"@trigger.dev/core": "3.3.3",
|
|
44
44
|
"chalk": "^5.2.0",
|
|
45
45
|
"cronstrue": "^2.21.0",
|
|
46
46
|
"debug": "^4.3.4",
|