@lessly/sdk-app 97.3.0 → 97.5.0
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/CHANGELOG.md +4 -3
- package/dist/_types/gen/client.gen.d.ts +38 -1
- package/dist/_types/gen/manifest.gen.d.ts +1 -1
- package/dist/_types/gen/playground/connect.gen.d.ts +3 -0
- package/dist/_types/gen/playground/index.d.ts +3 -0
- package/dist/_types/gen/playground/queryOptions.gen.d.ts +70 -0
- package/dist/_types/gen/types.gen.d.ts +326 -0
- package/dist/_types/index.d.ts +2 -1
- package/dist/_types/runtime/errors.d.ts +13 -2
- package/dist/chunk-2ZWQTRUQ.js +11788 -0
- package/dist/chunk-2ZWQTRUQ.js.map +1 -0
- package/dist/index.cjs +242 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +37 -11571
- package/dist/index.js.map +1 -1
- package/dist/playground/index.cjs +106 -0
- package/dist/playground/index.cjs.map +1 -0
- package/dist/playground/index.d.cts +1 -0
- package/dist/playground/index.d.ts +1 -0
- package/dist/playground/index.js +78 -0
- package/dist/playground/index.js.map +1 -0
- package/docs/recipes/access.md +13 -5
- package/package.json +12 -2
- package/src/gen/bindings.gen.ts +216 -1
- package/src/gen/client.gen.ts +71 -0
- package/src/gen/manifest.gen.ts +21 -1
- package/src/gen/playground/connect.gen.ts +9 -0
- package/src/gen/playground/index.ts +4 -0
- package/src/gen/playground/queryOptions.gen.ts +119 -0
- package/src/gen/types.gen.ts +372 -0
|
@@ -104970,6 +104970,332 @@ export interface OrganizationYoutubeInstallInput {
|
|
|
104970
104970
|
export interface OrganizationYoutubeInstallOutput {
|
|
104971
104971
|
url: string;
|
|
104972
104972
|
}
|
|
104973
|
+
export interface PlaygroundAnalyticsOverviewInput {
|
|
104974
|
+
/**
|
|
104975
|
+
* Max records per entity in recent[]; omit for the endpoint default
|
|
104976
|
+
*/
|
|
104977
|
+
limit?: number;
|
|
104978
|
+
}
|
|
104979
|
+
export interface PlaygroundAnalyticsOverviewOutput {
|
|
104980
|
+
ok: boolean;
|
|
104981
|
+
minted: boolean;
|
|
104982
|
+
overview?: unknown;
|
|
104983
|
+
http_status: number;
|
|
104984
|
+
}
|
|
104985
|
+
export interface PlaygroundBillingEntitlementsInput {
|
|
104986
|
+
}
|
|
104987
|
+
export interface PlaygroundBillingEntitlementsOutput {
|
|
104988
|
+
ok: boolean;
|
|
104989
|
+
minted: boolean;
|
|
104990
|
+
http_status: number;
|
|
104991
|
+
entitlements?: unknown;
|
|
104992
|
+
}
|
|
104993
|
+
export interface PlaygroundBillingRecordUsageInput {
|
|
104994
|
+
/**
|
|
104995
|
+
* Quantity of events to record against playground-events (SUM); defaults to 1
|
|
104996
|
+
*/
|
|
104997
|
+
value?: number;
|
|
104998
|
+
}
|
|
104999
|
+
export interface PlaygroundBillingRecordUsageOutput {
|
|
105000
|
+
minted: boolean;
|
|
105001
|
+
accepted: (number | null);
|
|
105002
|
+
recorded: boolean;
|
|
105003
|
+
duplicates: (number | null);
|
|
105004
|
+
http_status: number;
|
|
105005
|
+
}
|
|
105006
|
+
export interface PlaygroundClickupCreateTaskInput {
|
|
105007
|
+
/**
|
|
105008
|
+
* Task title; defaults to a fixture label
|
|
105009
|
+
*/
|
|
105010
|
+
name?: string;
|
|
105011
|
+
/**
|
|
105012
|
+
* ClickUp list id; falls back to CLICKUP_TEST_LIST_ID
|
|
105013
|
+
*/
|
|
105014
|
+
listId?: string;
|
|
105015
|
+
}
|
|
105016
|
+
export interface PlaygroundClickupCreateTaskOutput {
|
|
105017
|
+
minted: boolean;
|
|
105018
|
+
task_id: (string | null);
|
|
105019
|
+
list_status: number;
|
|
105020
|
+
vend_status: number;
|
|
105021
|
+
clickup_status: number;
|
|
105022
|
+
installation_count: number;
|
|
105023
|
+
}
|
|
105024
|
+
export interface PlaygroundClickupGetLastWebhookInput {
|
|
105025
|
+
}
|
|
105026
|
+
export type PlaygroundClickupGetLastWebhookOutput = ({
|
|
105027
|
+
payload: string;
|
|
105028
|
+
event_id: string;
|
|
105029
|
+
provider: string;
|
|
105030
|
+
verified: boolean;
|
|
105031
|
+
product_id: string;
|
|
105032
|
+
occurred_at: string;
|
|
105033
|
+
connector_id: string;
|
|
105034
|
+
clickup_event: (string | null);
|
|
105035
|
+
receipt_count: number;
|
|
105036
|
+
} | {
|
|
105037
|
+
found: false;
|
|
105038
|
+
});
|
|
105039
|
+
export interface PlaygroundClickupGetOverviewInput {
|
|
105040
|
+
}
|
|
105041
|
+
export interface PlaygroundClickupGetOverviewOutput {
|
|
105042
|
+
team: ({
|
|
105043
|
+
teamId: string;
|
|
105044
|
+
teamName: string;
|
|
105045
|
+
} | null);
|
|
105046
|
+
lists: PlaygroundClickupGetOverviewOutputItems[];
|
|
105047
|
+
tasks: {
|
|
105048
|
+
id: string;
|
|
105049
|
+
name: string;
|
|
105050
|
+
status: (string | null);
|
|
105051
|
+
}[];
|
|
105052
|
+
minted: boolean;
|
|
105053
|
+
spaces: PlaygroundClickupGetOverviewOutputItems[];
|
|
105054
|
+
list_status: number;
|
|
105055
|
+
vend_status: number;
|
|
105056
|
+
lists_status: number;
|
|
105057
|
+
tasks_status: number;
|
|
105058
|
+
spaces_status: number;
|
|
105059
|
+
folders_status: number;
|
|
105060
|
+
installation_count: number;
|
|
105061
|
+
}
|
|
105062
|
+
export interface PlaygroundClickupGetOverviewOutputItems {
|
|
105063
|
+
id: string;
|
|
105064
|
+
name: string;
|
|
105065
|
+
}
|
|
105066
|
+
export interface PlaygroundEchoPingInput {
|
|
105067
|
+
/**
|
|
105068
|
+
* The text to echo back, 1–1024 characters
|
|
105069
|
+
*/
|
|
105070
|
+
message: string;
|
|
105071
|
+
}
|
|
105072
|
+
export interface PlaygroundEchoPingOutput {
|
|
105073
|
+
/**
|
|
105074
|
+
* The message exactly as it was received
|
|
105075
|
+
*/
|
|
105076
|
+
message: string;
|
|
105077
|
+
/**
|
|
105078
|
+
* The product the call was resolved to
|
|
105079
|
+
*/
|
|
105080
|
+
productId: string;
|
|
105081
|
+
/**
|
|
105082
|
+
* ISO-8601 instant (UTC) at which the call reached the service
|
|
105083
|
+
*/
|
|
105084
|
+
receivedAt: string;
|
|
105085
|
+
}
|
|
105086
|
+
export interface PlaygroundGdriveGetLastChangeInput {
|
|
105087
|
+
}
|
|
105088
|
+
export type PlaygroundGdriveGetLastChangeOutput = ({
|
|
105089
|
+
file_id: string;
|
|
105090
|
+
removed: boolean;
|
|
105091
|
+
file_name: (string | null);
|
|
105092
|
+
mime_type: (string | null);
|
|
105093
|
+
product_id: string;
|
|
105094
|
+
occurred_at: string;
|
|
105095
|
+
connector_id: string;
|
|
105096
|
+
resource_state: string;
|
|
105097
|
+
} | {
|
|
105098
|
+
found: false;
|
|
105099
|
+
});
|
|
105100
|
+
export interface PlaygroundGdriveReadFileInput {
|
|
105101
|
+
/**
|
|
105102
|
+
* Drive file id; falls back to GDRIVE_TEST_FILE_ID, then the first picked file
|
|
105103
|
+
*/
|
|
105104
|
+
fileId?: string;
|
|
105105
|
+
}
|
|
105106
|
+
export interface PlaygroundGdriveReadFileOutput {
|
|
105107
|
+
minted: boolean;
|
|
105108
|
+
file_id: (string | null);
|
|
105109
|
+
file_name: (string | null);
|
|
105110
|
+
mime_type: (string | null);
|
|
105111
|
+
file_count: number;
|
|
105112
|
+
get_status: number;
|
|
105113
|
+
list_status: number;
|
|
105114
|
+
vend_status: number;
|
|
105115
|
+
content_bytes: (number | null);
|
|
105116
|
+
}
|
|
105117
|
+
export interface PlaygroundGoogleadsReadCustomerInput {
|
|
105118
|
+
}
|
|
105119
|
+
export interface PlaygroundGoogleadsReadCustomerOutput {
|
|
105120
|
+
minted: boolean;
|
|
105121
|
+
vended: boolean;
|
|
105122
|
+
customer_id: (string | null);
|
|
105123
|
+
vend_status: number;
|
|
105124
|
+
result_count: number;
|
|
105125
|
+
search_status: number;
|
|
105126
|
+
login_customer_id: (string | null);
|
|
105127
|
+
}
|
|
105128
|
+
export interface PlaygroundLifecycleGetStateInput {
|
|
105129
|
+
}
|
|
105130
|
+
export interface PlaygroundLifecycleGetStateOutput {
|
|
105131
|
+
blocked: boolean;
|
|
105132
|
+
archived: boolean;
|
|
105133
|
+
productId: string;
|
|
105134
|
+
lastBlockTransition: ({
|
|
105135
|
+
eventId: string;
|
|
105136
|
+
eventName: string;
|
|
105137
|
+
productId: string;
|
|
105138
|
+
occurredAt: string;
|
|
105139
|
+
recordedAt: string;
|
|
105140
|
+
receiptCount: number;
|
|
105141
|
+
organizationId: string;
|
|
105142
|
+
cascadedFromOrg: boolean;
|
|
105143
|
+
} | null);
|
|
105144
|
+
lastArchiveTransition: ({
|
|
105145
|
+
eventId: string;
|
|
105146
|
+
eventName: string;
|
|
105147
|
+
productId: string;
|
|
105148
|
+
occurredAt: string;
|
|
105149
|
+
recordedAt: string;
|
|
105150
|
+
receiptCount: number;
|
|
105151
|
+
organizationId: string;
|
|
105152
|
+
cascadedFromOrg: boolean;
|
|
105153
|
+
} | null);
|
|
105154
|
+
}
|
|
105155
|
+
export interface PlaygroundLifecycleListEventsInput {
|
|
105156
|
+
}
|
|
105157
|
+
export type PlaygroundLifecycleListEventsOutput = {
|
|
105158
|
+
eventId: string;
|
|
105159
|
+
eventName: string;
|
|
105160
|
+
productId: string;
|
|
105161
|
+
occurredAt: string;
|
|
105162
|
+
recordedAt: string;
|
|
105163
|
+
receiptCount: number;
|
|
105164
|
+
organizationId: string;
|
|
105165
|
+
cascadedFromOrg: boolean;
|
|
105166
|
+
}[];
|
|
105167
|
+
export interface PlaygroundWebhookGetLastInput {
|
|
105168
|
+
}
|
|
105169
|
+
export type PlaygroundWebhookGetLastOutput = ({
|
|
105170
|
+
payload?: unknown;
|
|
105171
|
+
event_id: string;
|
|
105172
|
+
provider: string;
|
|
105173
|
+
verified: boolean;
|
|
105174
|
+
product_id: string;
|
|
105175
|
+
occurred_at: string;
|
|
105176
|
+
connector_id: string;
|
|
105177
|
+
delivery_count: number;
|
|
105178
|
+
} | {
|
|
105179
|
+
found: false;
|
|
105180
|
+
});
|
|
105181
|
+
export interface PlaygroundWorkflowEchoInput {
|
|
105182
|
+
/**
|
|
105183
|
+
* The text to store, 1–1024 characters
|
|
105184
|
+
*/
|
|
105185
|
+
note: string;
|
|
105186
|
+
/**
|
|
105187
|
+
* Optional labels stored alongside the note, at most 20
|
|
105188
|
+
*
|
|
105189
|
+
* @maxItems 20
|
|
105190
|
+
*/
|
|
105191
|
+
tags?: [] | [string] | [string, string] | [string, string, string] | [string, string, string, string] | [string, string, string, string, string] | [string, string, string, string, string, string] | [string, string, string, string, string, string, string] | [string, string, string, string, string, string, string, string] | [string, string, string, string, string, string, string, string, string] | [string, string, string, string, string, string, string, string, string, string] | [string, string, string, string, string, string, string, string, string, string, string] | [string, string, string, string, string, string, string, string, string, string, string, string] | [string, string, string, string, string, string, string, string, string, string, string, string, string] | [string, string, string, string, string, string, string, string, string, string, string, string, string, string] | [string, string, string, string, string, string, string, string, string, string, string, string, string, string, string] | [string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string] | [string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string] | [string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string] | [string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string] | [string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string];
|
|
105192
|
+
}
|
|
105193
|
+
export interface PlaygroundWorkflowEchoOutput {
|
|
105194
|
+
/**
|
|
105195
|
+
* Identifier of the stored echo
|
|
105196
|
+
*/
|
|
105197
|
+
id: string;
|
|
105198
|
+
/**
|
|
105199
|
+
* The note exactly as it was received
|
|
105200
|
+
*/
|
|
105201
|
+
note: string;
|
|
105202
|
+
/**
|
|
105203
|
+
* The tags exactly as they were received
|
|
105204
|
+
*/
|
|
105205
|
+
tags: string[];
|
|
105206
|
+
/**
|
|
105207
|
+
* Correlation id for this echo. The playground/workflow.echoed event published about two seconds later repeats it, which is how a composer matches the completion back to this step.
|
|
105208
|
+
*/
|
|
105209
|
+
echo_id: string;
|
|
105210
|
+
/**
|
|
105211
|
+
* ISO-8601 instant (UTC) at which the echo was stored
|
|
105212
|
+
*/
|
|
105213
|
+
received_at: string;
|
|
105214
|
+
}
|
|
105215
|
+
export interface PlaygroundWorkflowEchoListInput {
|
|
105216
|
+
}
|
|
105217
|
+
export type PlaygroundWorkflowEchoListOutput = {
|
|
105218
|
+
/**
|
|
105219
|
+
* Identifier of the stored echo
|
|
105220
|
+
*/
|
|
105221
|
+
id: string;
|
|
105222
|
+
/**
|
|
105223
|
+
* The note exactly as it was received
|
|
105224
|
+
*/
|
|
105225
|
+
note: string;
|
|
105226
|
+
/**
|
|
105227
|
+
* The tags exactly as they were received
|
|
105228
|
+
*/
|
|
105229
|
+
tags: string[];
|
|
105230
|
+
/**
|
|
105231
|
+
* ISO-8601 instant (UTC) at which the echo was stored
|
|
105232
|
+
*/
|
|
105233
|
+
received_at: string;
|
|
105234
|
+
}[];
|
|
105235
|
+
export interface PlaygroundWorkflowPingInput {
|
|
105236
|
+
/**
|
|
105237
|
+
* Class of ping, echoed on the emitted event and filterable on the trigger. Defaults to 'manual'.
|
|
105238
|
+
*/
|
|
105239
|
+
kind?: string;
|
|
105240
|
+
}
|
|
105241
|
+
export interface PlaygroundWorkflowPingOutput {
|
|
105242
|
+
/**
|
|
105243
|
+
* Correlation id for this ping. The emitted playground/workflow.ping event repeats it, which is how a composer matches the event back to this step.
|
|
105244
|
+
*/
|
|
105245
|
+
id: string;
|
|
105246
|
+
/**
|
|
105247
|
+
* The name of the event that was published
|
|
105248
|
+
*/
|
|
105249
|
+
event: string;
|
|
105250
|
+
}
|
|
105251
|
+
export interface PlaygroundWorkflowSubjectsListInput {
|
|
105252
|
+
/**
|
|
105253
|
+
* How many subjects to return, 1–100. Defaults to 25.
|
|
105254
|
+
*/
|
|
105255
|
+
limit?: number;
|
|
105256
|
+
/**
|
|
105257
|
+
* The next_cursor of the previous page. Opaque — pass it back unchanged. Omit for the first page.
|
|
105258
|
+
*/
|
|
105259
|
+
cursor?: string;
|
|
105260
|
+
/**
|
|
105261
|
+
* ISO-8601 UTC instant. Return only subjects whose last_activity_at is AT OR AFTER this — the opposite question, the recently active population. Omit for no lower bound.
|
|
105262
|
+
*/
|
|
105263
|
+
last_activity_after?: string;
|
|
105264
|
+
/**
|
|
105265
|
+
* ISO-8601 UTC instant. Return only subjects whose last_activity_at is AT OR BEFORE this — the "inactive for N days" question: pass now minus N days. Omit for no upper bound.
|
|
105266
|
+
*/
|
|
105267
|
+
last_activity_before?: string;
|
|
105268
|
+
}
|
|
105269
|
+
export interface PlaygroundWorkflowSubjectsListOutput {
|
|
105270
|
+
/**
|
|
105271
|
+
* This page of subjects, most recently active first
|
|
105272
|
+
*/
|
|
105273
|
+
items: {
|
|
105274
|
+
/**
|
|
105275
|
+
* Stable identifier for the subject. This is the field a batch trigger keys on, so a subject already served in an earlier run is skipped rather than served twice.
|
|
105276
|
+
*/
|
|
105277
|
+
subject_key: string;
|
|
105278
|
+
/**
|
|
105279
|
+
* Human-readable name of the subject
|
|
105280
|
+
*/
|
|
105281
|
+
display_name: string;
|
|
105282
|
+
/**
|
|
105283
|
+
* ISO-8601 instant (UTC) of the subject last activity
|
|
105284
|
+
*/
|
|
105285
|
+
last_activity_at: string;
|
|
105286
|
+
}[];
|
|
105287
|
+
/**
|
|
105288
|
+
* Whether another page follows. False and a null next_cursor both mark the last page, so a consumer that loops on either terminates.
|
|
105289
|
+
*/
|
|
105290
|
+
has_more: boolean;
|
|
105291
|
+
/**
|
|
105292
|
+
* Pass back as `cursor` to fetch the next page; null on the last page. Always null when has_more is false.
|
|
105293
|
+
*/
|
|
105294
|
+
next_cursor: (string | null);
|
|
105295
|
+
}
|
|
105296
|
+
export interface PlaygroundWsEchoInput {
|
|
105297
|
+
}
|
|
105298
|
+
export type PlaygroundWsEchoOutput = unknown;
|
|
104973
105299
|
export interface RealtimeArchiveExportInput {
|
|
104974
105300
|
/**
|
|
104975
105301
|
* Only entries with ts <= to_ts (epoch ms)
|
package/dist/_types/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
export { createLesslyApp } from './runtime/createLesslyApp.js';
|
|
2
2
|
export type { LesslyClientBase } from './runtime/createLesslyApp.js';
|
|
3
3
|
export { connectStream } from './runtime/connectStream.js';
|
|
4
|
-
export { LesslyApiError, isAccessDenied, isEntitlementError, upgradeUrl } from './runtime/errors.js';
|
|
4
|
+
export { LesslyApiError, isAccessDenied, accessDenialKind, isEntitlementError, upgradeUrl } from './runtime/errors.js';
|
|
5
|
+
export type { AccessDenialKind } from './runtime/errors.js';
|
|
5
6
|
export { accessReason } from './runtime/access-reason.js';
|
|
6
7
|
export { platformApiBaseUrl } from './runtime/platform-base-url.js';
|
|
7
8
|
export { operations } from './runtime/operations.js';
|
|
@@ -1,14 +1,18 @@
|
|
|
1
|
+
export type AccessDenialKind = 'role_denied' | 'no_tool_permission' | 'operation_uncatalogued';
|
|
1
2
|
export declare class LesslyApiError extends Error {
|
|
2
3
|
readonly status: number;
|
|
3
4
|
readonly code: string | null;
|
|
4
5
|
readonly body: unknown;
|
|
5
|
-
/** True
|
|
6
|
+
/** True for the three neutral gateway 403 refusals. See `isAccessDenied`. */
|
|
6
7
|
readonly accessDenied: boolean;
|
|
7
8
|
constructor(status: number, code: string | null, message: string, body: unknown);
|
|
8
9
|
}
|
|
9
10
|
export declare function parseErrorBody(body: unknown, status: number): LesslyApiError;
|
|
10
11
|
/**
|
|
11
|
-
* True
|
|
12
|
+
* True for the gateway's `role_denied`, `no_tool_permission`, and `operation_uncatalogued` 403s.
|
|
13
|
+
* The first two are permission decisions; `operation_uncatalogued` is a catalog/rollout state.
|
|
14
|
+
* Render all three as the same neutral state. Use `accessDenialKind` only when diagnostics need
|
|
15
|
+
* to distinguish the catalog case.
|
|
12
16
|
*
|
|
13
17
|
* Deliberately structural after the `instanceof` fast path: an App is composed into the shell
|
|
14
18
|
* through Module Federation and `@lessly/sdk-app` is not a shared singleton, so the error a
|
|
@@ -16,6 +20,13 @@ export declare function parseErrorBody(body: unknown, status: number): LesslyApi
|
|
|
16
20
|
* report false there and an App would render a red crash for an ordinary permission refusal.
|
|
17
21
|
*/
|
|
18
22
|
export declare function isAccessDenied(err: unknown): boolean;
|
|
23
|
+
/**
|
|
24
|
+
* The exact gateway access-refusal code at HTTP 403, or null for any other error.
|
|
25
|
+
* Structural like `isAccessDenied`, because an App may catch an error from another SDK copy.
|
|
26
|
+
* Use the kind for telemetry or developer-only catalog diagnostics, never to vary user-facing
|
|
27
|
+
* denial copy: `operation_uncatalogued` gets the same neutral state as the permission codes.
|
|
28
|
+
*/
|
|
29
|
+
export declare function accessDenialKind(err: unknown): AccessDenialKind | null;
|
|
19
30
|
/**
|
|
20
31
|
* True iff `err` is billing refusing the call over the organization's plan (trial cap reached,
|
|
21
32
|
* a class closed on a trial, billing or budget paused). Inside the Workspace shell the shell
|