@lessly/sdk-app 61.0.2 → 61.1.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/dist/_types/gen/client.gen.d.ts +29 -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 +50 -0
- package/dist/_types/gen/types.gen.d.ts +192 -0
- package/dist/_types/index.d.ts +2 -1
- package/dist/_types/react/index.d.ts +33 -0
- package/dist/_types/runtime/access.d.ts +40 -0
- package/dist/_types/runtime/createLesslyApp.d.ts +4 -0
- package/dist/_types/runtime/errors.d.ts +11 -0
- package/dist/_types/runtime/permission-match.d.ts +62 -0
- package/dist/chunk-T4K7L6V5.js +10218 -0
- package/dist/chunk-T4K7L6V5.js.map +1 -0
- package/dist/index.cjs +857 -26
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +699 -10073
- package/dist/index.js.map +1 -1
- package/dist/playground/index.cjs +81 -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 +58 -0
- package/dist/playground/index.js.map +1 -0
- package/dist/react/index.cjs +29 -0
- package/dist/react/index.cjs.map +1 -0
- package/dist/react/index.d.cts +1 -0
- package/dist/react/index.d.ts +1 -0
- package/dist/react/index.js +26 -0
- package/dist/react/index.js.map +1 -0
- package/docs/README.md +1 -0
- package/docs/recipes/access.md +177 -0
- package/docs/rules.md +33 -0
- package/package.json +35 -2
- package/src/gen/bindings.gen.ts +163 -27
- package/src/gen/client.gen.ts +52 -0
- package/src/gen/manifest.gen.ts +39 -27
- package/src/gen/playground/connect.gen.ts +9 -0
- package/src/gen/playground/index.ts +4 -0
- package/src/gen/playground/queryOptions.gen.ts +86 -0
- package/src/gen/types.gen.ts +227 -0
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
// AUTOGENERATED by scripts/generate.ts — do not edit.
|
|
2
|
+
import type { GeneratedClient } from '../client.gen';
|
|
3
|
+
import type {
|
|
4
|
+
PlaygroundAnalyticsOverviewInput,
|
|
5
|
+
PlaygroundAnalyticsOverviewOutput,
|
|
6
|
+
PlaygroundBillingEntitlementsInput,
|
|
7
|
+
PlaygroundBillingEntitlementsOutput,
|
|
8
|
+
PlaygroundBillingRecordUsageInput,
|
|
9
|
+
PlaygroundClickupCreateTaskInput,
|
|
10
|
+
PlaygroundClickupGetLastWebhookInput,
|
|
11
|
+
PlaygroundClickupGetLastWebhookOutput,
|
|
12
|
+
PlaygroundClickupGetOverviewInput,
|
|
13
|
+
PlaygroundClickupGetOverviewOutput,
|
|
14
|
+
PlaygroundGdriveGetLastChangeInput,
|
|
15
|
+
PlaygroundGdriveGetLastChangeOutput,
|
|
16
|
+
PlaygroundGdriveReadFileInput,
|
|
17
|
+
PlaygroundGdriveReadFileOutput,
|
|
18
|
+
PlaygroundGoogleadsReadCustomerInput,
|
|
19
|
+
PlaygroundGoogleadsReadCustomerOutput,
|
|
20
|
+
PlaygroundLifecycleGetStateInput,
|
|
21
|
+
PlaygroundLifecycleGetStateOutput,
|
|
22
|
+
PlaygroundLifecycleListEventsInput,
|
|
23
|
+
PlaygroundLifecycleListEventsOutput,
|
|
24
|
+
PlaygroundWebhookGetLastInput,
|
|
25
|
+
PlaygroundWebhookGetLastOutput,
|
|
26
|
+
} from '../types.gen';
|
|
27
|
+
|
|
28
|
+
export const playgroundAnalyticsOverviewQueryOptions = (sdk: GeneratedClient, input: PlaygroundAnalyticsOverviewInput) => ({
|
|
29
|
+
queryKey: ['playground', 'analytics', 'overview', input] as const,
|
|
30
|
+
queryFn: () => sdk['playground']['analytics']['overview'](input),
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
export const playgroundBillingEntitlementsQueryOptions = (sdk: GeneratedClient, input: PlaygroundBillingEntitlementsInput) => ({
|
|
34
|
+
queryKey: ['playground', 'billing', 'entitlements', input] as const,
|
|
35
|
+
queryFn: () => sdk['playground']['billing']['entitlements'](input),
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
export const playgroundBillingRecordUsageMutationOptions = (sdk: GeneratedClient) => ({
|
|
39
|
+
mutationKey: ['playground', 'billing', 'record-usage'],
|
|
40
|
+
mutationFn: (input: PlaygroundBillingRecordUsageInput) => sdk['playground']['billing']['record-usage'](input),
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
export const playgroundClickupCreateTaskMutationOptions = (sdk: GeneratedClient) => ({
|
|
44
|
+
mutationKey: ['playground', 'clickup', 'create-task'],
|
|
45
|
+
mutationFn: (input: PlaygroundClickupCreateTaskInput) => sdk['playground']['clickup']['create-task'](input),
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
export const playgroundClickupGetLastWebhookQueryOptions = (sdk: GeneratedClient, input: PlaygroundClickupGetLastWebhookInput) => ({
|
|
49
|
+
queryKey: ['playground', 'clickup', 'get-last-webhook', input] as const,
|
|
50
|
+
queryFn: () => sdk['playground']['clickup']['get-last-webhook'](input),
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
export const playgroundClickupGetOverviewQueryOptions = (sdk: GeneratedClient, input: PlaygroundClickupGetOverviewInput) => ({
|
|
54
|
+
queryKey: ['playground', 'clickup', 'get-overview', input] as const,
|
|
55
|
+
queryFn: () => sdk['playground']['clickup']['get-overview'](input),
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
export const playgroundGdriveGetLastChangeQueryOptions = (sdk: GeneratedClient, input: PlaygroundGdriveGetLastChangeInput) => ({
|
|
59
|
+
queryKey: ['playground', 'gdrive', 'get-last-change', input] as const,
|
|
60
|
+
queryFn: () => sdk['playground']['gdrive']['get-last-change'](input),
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
export const playgroundGdriveReadFileQueryOptions = (sdk: GeneratedClient, input: PlaygroundGdriveReadFileInput) => ({
|
|
64
|
+
queryKey: ['playground', 'gdrive', 'read-file', input] as const,
|
|
65
|
+
queryFn: () => sdk['playground']['gdrive']['read-file'](input),
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
export const playgroundGoogleadsReadCustomerQueryOptions = (sdk: GeneratedClient, input: PlaygroundGoogleadsReadCustomerInput) => ({
|
|
69
|
+
queryKey: ['playground', 'googleads', 'read-customer', input] as const,
|
|
70
|
+
queryFn: () => sdk['playground']['googleads']['read-customer'](input),
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
export const playgroundLifecycleGetStateQueryOptions = (sdk: GeneratedClient, input: PlaygroundLifecycleGetStateInput) => ({
|
|
74
|
+
queryKey: ['playground', 'lifecycle', 'get-state', input] as const,
|
|
75
|
+
queryFn: () => sdk['playground']['lifecycle']['get-state'](input),
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
export const playgroundLifecycleListEventsQueryOptions = (sdk: GeneratedClient, input: PlaygroundLifecycleListEventsInput) => ({
|
|
79
|
+
queryKey: ['playground', 'lifecycle', 'list-events', input] as const,
|
|
80
|
+
queryFn: () => sdk['playground']['lifecycle']['list-events'](input),
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
export const playgroundWebhookGetLastQueryOptions = (sdk: GeneratedClient, input: PlaygroundWebhookGetLastInput) => ({
|
|
84
|
+
queryKey: ['playground', 'webhook', 'get-last', input] as const,
|
|
85
|
+
queryFn: () => sdk['playground']['webhook']['get-last'](input),
|
|
86
|
+
});
|
package/src/gen/types.gen.ts
CHANGED
|
@@ -85128,6 +85128,7 @@ displayName: (string | null)
|
|
|
85128
85128
|
orgRoles: {
|
|
85129
85129
|
id: string
|
|
85130
85130
|
name: string
|
|
85131
|
+
description: (string | null)
|
|
85131
85132
|
}[]
|
|
85132
85133
|
canManage: boolean
|
|
85133
85134
|
inherited: {
|
|
@@ -85524,6 +85525,232 @@ lastMessagePreview: (string | null)
|
|
|
85524
85525
|
}[]
|
|
85525
85526
|
}
|
|
85526
85527
|
|
|
85528
|
+
export interface PlaygroundAnalyticsOverviewInput {
|
|
85529
|
+
/**
|
|
85530
|
+
* Max records per entity in recent[]; omit for the endpoint default
|
|
85531
|
+
*/
|
|
85532
|
+
limit?: number
|
|
85533
|
+
}
|
|
85534
|
+
|
|
85535
|
+
export interface PlaygroundAnalyticsOverviewOutput {
|
|
85536
|
+
ok: boolean
|
|
85537
|
+
minted: boolean
|
|
85538
|
+
overview?: unknown
|
|
85539
|
+
http_status: number
|
|
85540
|
+
}
|
|
85541
|
+
|
|
85542
|
+
export interface PlaygroundBillingEntitlementsInput {
|
|
85543
|
+
|
|
85544
|
+
}
|
|
85545
|
+
|
|
85546
|
+
export interface PlaygroundBillingEntitlementsOutput {
|
|
85547
|
+
ok: boolean
|
|
85548
|
+
minted: boolean
|
|
85549
|
+
http_status: number
|
|
85550
|
+
entitlements?: unknown
|
|
85551
|
+
}
|
|
85552
|
+
|
|
85553
|
+
export interface PlaygroundBillingRecordUsageInput {
|
|
85554
|
+
/**
|
|
85555
|
+
* Quantity of events to record against playground-events (SUM); defaults to 1
|
|
85556
|
+
*/
|
|
85557
|
+
value?: number
|
|
85558
|
+
}
|
|
85559
|
+
|
|
85560
|
+
export interface PlaygroundBillingRecordUsageOutput {
|
|
85561
|
+
minted: boolean
|
|
85562
|
+
accepted: (number | null)
|
|
85563
|
+
recorded: boolean
|
|
85564
|
+
duplicates: (number | null)
|
|
85565
|
+
http_status: number
|
|
85566
|
+
}
|
|
85567
|
+
|
|
85568
|
+
export interface PlaygroundClickupCreateTaskInput {
|
|
85569
|
+
/**
|
|
85570
|
+
* Task title; defaults to a fixture label
|
|
85571
|
+
*/
|
|
85572
|
+
name?: string
|
|
85573
|
+
/**
|
|
85574
|
+
* ClickUp list id; falls back to CLICKUP_TEST_LIST_ID
|
|
85575
|
+
*/
|
|
85576
|
+
listId?: string
|
|
85577
|
+
}
|
|
85578
|
+
|
|
85579
|
+
export interface PlaygroundClickupCreateTaskOutput {
|
|
85580
|
+
minted: boolean
|
|
85581
|
+
task_id: (string | null)
|
|
85582
|
+
list_status: number
|
|
85583
|
+
vend_status: number
|
|
85584
|
+
clickup_status: number
|
|
85585
|
+
installation_count: number
|
|
85586
|
+
}
|
|
85587
|
+
|
|
85588
|
+
export interface PlaygroundClickupGetLastWebhookInput {
|
|
85589
|
+
|
|
85590
|
+
}
|
|
85591
|
+
|
|
85592
|
+
export type PlaygroundClickupGetLastWebhookOutput = ({
|
|
85593
|
+
payload: string
|
|
85594
|
+
event_id: string
|
|
85595
|
+
provider: string
|
|
85596
|
+
verified: boolean
|
|
85597
|
+
product_id: string
|
|
85598
|
+
occurred_at: string
|
|
85599
|
+
connector_id: string
|
|
85600
|
+
clickup_event: (string | null)
|
|
85601
|
+
receipt_count: number
|
|
85602
|
+
} | {
|
|
85603
|
+
found: false
|
|
85604
|
+
})
|
|
85605
|
+
|
|
85606
|
+
export interface PlaygroundClickupGetOverviewInput {
|
|
85607
|
+
|
|
85608
|
+
}
|
|
85609
|
+
|
|
85610
|
+
export interface PlaygroundClickupGetOverviewOutput {
|
|
85611
|
+
team: ({
|
|
85612
|
+
teamId: string
|
|
85613
|
+
teamName: string
|
|
85614
|
+
} | null)
|
|
85615
|
+
lists: PlaygroundClickupGetOverviewOutputItems[]
|
|
85616
|
+
tasks: {
|
|
85617
|
+
id: string
|
|
85618
|
+
name: string
|
|
85619
|
+
status: (string | null)
|
|
85620
|
+
}[]
|
|
85621
|
+
minted: boolean
|
|
85622
|
+
spaces: PlaygroundClickupGetOverviewOutputItems[]
|
|
85623
|
+
list_status: number
|
|
85624
|
+
vend_status: number
|
|
85625
|
+
lists_status: number
|
|
85626
|
+
tasks_status: number
|
|
85627
|
+
spaces_status: number
|
|
85628
|
+
folders_status: number
|
|
85629
|
+
installation_count: number
|
|
85630
|
+
}
|
|
85631
|
+
export interface PlaygroundClickupGetOverviewOutputItems {
|
|
85632
|
+
id: string
|
|
85633
|
+
name: string
|
|
85634
|
+
}
|
|
85635
|
+
|
|
85636
|
+
export interface PlaygroundGdriveGetLastChangeInput {
|
|
85637
|
+
|
|
85638
|
+
}
|
|
85639
|
+
|
|
85640
|
+
export type PlaygroundGdriveGetLastChangeOutput = ({
|
|
85641
|
+
file_id: string
|
|
85642
|
+
removed: boolean
|
|
85643
|
+
file_name: (string | null)
|
|
85644
|
+
mime_type: (string | null)
|
|
85645
|
+
product_id: string
|
|
85646
|
+
occurred_at: string
|
|
85647
|
+
connector_id: string
|
|
85648
|
+
resource_state: string
|
|
85649
|
+
} | {
|
|
85650
|
+
found: false
|
|
85651
|
+
})
|
|
85652
|
+
|
|
85653
|
+
export interface PlaygroundGdriveReadFileInput {
|
|
85654
|
+
/**
|
|
85655
|
+
* Drive file id; falls back to GDRIVE_TEST_FILE_ID, then the first picked file
|
|
85656
|
+
*/
|
|
85657
|
+
fileId?: string
|
|
85658
|
+
}
|
|
85659
|
+
|
|
85660
|
+
export interface PlaygroundGdriveReadFileOutput {
|
|
85661
|
+
minted: boolean
|
|
85662
|
+
file_id: (string | null)
|
|
85663
|
+
file_name: (string | null)
|
|
85664
|
+
mime_type: (string | null)
|
|
85665
|
+
file_count: number
|
|
85666
|
+
get_status: number
|
|
85667
|
+
list_status: number
|
|
85668
|
+
vend_status: number
|
|
85669
|
+
content_bytes: (number | null)
|
|
85670
|
+
}
|
|
85671
|
+
|
|
85672
|
+
export interface PlaygroundGoogleadsReadCustomerInput {
|
|
85673
|
+
|
|
85674
|
+
}
|
|
85675
|
+
|
|
85676
|
+
export interface PlaygroundGoogleadsReadCustomerOutput {
|
|
85677
|
+
minted: boolean
|
|
85678
|
+
vended: boolean
|
|
85679
|
+
customer_id: (string | null)
|
|
85680
|
+
vend_status: number
|
|
85681
|
+
result_count: number
|
|
85682
|
+
search_status: number
|
|
85683
|
+
login_customer_id: (string | null)
|
|
85684
|
+
}
|
|
85685
|
+
|
|
85686
|
+
export interface PlaygroundLifecycleGetStateInput {
|
|
85687
|
+
|
|
85688
|
+
}
|
|
85689
|
+
|
|
85690
|
+
export interface PlaygroundLifecycleGetStateOutput {
|
|
85691
|
+
blocked: boolean
|
|
85692
|
+
archived: boolean
|
|
85693
|
+
productId: string
|
|
85694
|
+
lastBlockTransition: ({
|
|
85695
|
+
eventId: string
|
|
85696
|
+
eventName: string
|
|
85697
|
+
productId: string
|
|
85698
|
+
occurredAt: string
|
|
85699
|
+
recordedAt: string
|
|
85700
|
+
receiptCount: number
|
|
85701
|
+
organizationId: string
|
|
85702
|
+
cascadedFromOrg: boolean
|
|
85703
|
+
} | null)
|
|
85704
|
+
lastArchiveTransition: ({
|
|
85705
|
+
eventId: string
|
|
85706
|
+
eventName: string
|
|
85707
|
+
productId: string
|
|
85708
|
+
occurredAt: string
|
|
85709
|
+
recordedAt: string
|
|
85710
|
+
receiptCount: number
|
|
85711
|
+
organizationId: string
|
|
85712
|
+
cascadedFromOrg: boolean
|
|
85713
|
+
} | null)
|
|
85714
|
+
}
|
|
85715
|
+
|
|
85716
|
+
export interface PlaygroundLifecycleListEventsInput {
|
|
85717
|
+
|
|
85718
|
+
}
|
|
85719
|
+
|
|
85720
|
+
export type PlaygroundLifecycleListEventsOutput = {
|
|
85721
|
+
eventId: string
|
|
85722
|
+
eventName: string
|
|
85723
|
+
productId: string
|
|
85724
|
+
occurredAt: string
|
|
85725
|
+
recordedAt: string
|
|
85726
|
+
receiptCount: number
|
|
85727
|
+
organizationId: string
|
|
85728
|
+
cascadedFromOrg: boolean
|
|
85729
|
+
}[]
|
|
85730
|
+
|
|
85731
|
+
export interface PlaygroundWebhookGetLastInput {
|
|
85732
|
+
|
|
85733
|
+
}
|
|
85734
|
+
|
|
85735
|
+
export type PlaygroundWebhookGetLastOutput = ({
|
|
85736
|
+
payload?: unknown
|
|
85737
|
+
event_id: string
|
|
85738
|
+
provider: string
|
|
85739
|
+
verified: boolean
|
|
85740
|
+
product_id: string
|
|
85741
|
+
occurred_at: string
|
|
85742
|
+
connector_id: string
|
|
85743
|
+
delivery_count: number
|
|
85744
|
+
} | {
|
|
85745
|
+
found: false
|
|
85746
|
+
})
|
|
85747
|
+
|
|
85748
|
+
export interface PlaygroundWsEchoInput {
|
|
85749
|
+
|
|
85750
|
+
}
|
|
85751
|
+
|
|
85752
|
+
export type PlaygroundWsEchoOutput = unknown;
|
|
85753
|
+
|
|
85527
85754
|
export interface RealtimeArchiveExportInput {
|
|
85528
85755
|
/**
|
|
85529
85756
|
* Only entries with ts <= to_ts (epoch ms)
|