@burdenoff/sdk-libs 2026.522.1 → 2026.525.1
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/modules/billing/index.cjs +46 -32
- package/dist/modules/billing/index.d.cts +19 -14
- package/dist/modules/billing/index.d.ts +19 -14
- package/dist/modules/billing/index.js +46 -32
- package/dist/modules/conversations/index.cjs +318 -39
- package/dist/modules/conversations/index.d.cts +255 -12
- package/dist/modules/conversations/index.d.ts +255 -12
- package/dist/modules/conversations/index.js +315 -36
- package/dist/modules/devportal/index.cjs +63 -48
- package/dist/modules/devportal/index.d.cts +84 -15
- package/dist/modules/devportal/index.d.ts +84 -15
- package/dist/modules/devportal/index.js +63 -48
- package/dist/modules/export/index.cjs +69 -15
- package/dist/modules/export/index.d.cts +59 -1
- package/dist/modules/export/index.d.ts +59 -1
- package/dist/modules/export/index.js +69 -15
- package/dist/modules/integrations/index.cjs +132 -16
- package/dist/modules/integrations/index.d.cts +109 -1
- package/dist/modules/integrations/index.d.ts +109 -1
- package/dist/modules/integrations/index.js +132 -16
- package/dist/modules/scheduler/index.cjs +194 -18
- package/dist/modules/scheduler/index.d.cts +193 -1
- package/dist/modules/scheduler/index.d.ts +193 -1
- package/dist/modules/scheduler/index.js +194 -18
- package/dist/modules/store/index.cjs +76 -54
- package/dist/modules/store/index.d.cts +101 -54
- package/dist/modules/store/index.d.ts +101 -54
- package/dist/modules/store/index.js +70 -48
- package/dist/modules/vibecontrols/index.cjs +1247 -289
- package/dist/modules/vibecontrols/index.d.cts +1603 -5
- package/dist/modules/vibecontrols/index.d.ts +1603 -5
- package/dist/modules/vibecontrols/index.js +1253 -295
- package/dist/modules/workspaces/index.cjs +19 -15
- package/dist/modules/workspaces/index.d.cts +54 -28
- package/dist/modules/workspaces/index.d.ts +54 -28
- package/dist/modules/workspaces/index.js +19 -15
- package/package.json +3 -3
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
var
|
|
1
|
+
var n=`
|
|
2
2
|
fragment ScheduledJobFields on ScheduledJob {
|
|
3
3
|
id name description scheduleType cronExpression interval intervalUnit
|
|
4
4
|
rrule timezone startDate endDate status workspaceId metadata payload
|
|
5
5
|
createdAt updatedAt
|
|
6
6
|
}
|
|
7
|
-
`,
|
|
7
|
+
`,c=`
|
|
8
8
|
fragment JobExecutionFields on JobExecution {
|
|
9
9
|
id scheduleId status attemptNumber startedAt completedAt
|
|
10
10
|
errorMessage result createdAt updatedAt
|
|
11
11
|
}
|
|
12
|
-
`,
|
|
13
|
-
${
|
|
12
|
+
`,p=`
|
|
13
|
+
${n}
|
|
14
14
|
query ScheduledJobs(
|
|
15
15
|
$workspaceId: ID!
|
|
16
16
|
$filter: JobFilterInput
|
|
@@ -22,25 +22,25 @@ var i=`
|
|
|
22
22
|
pageInfo { hasNextPage endCursor }
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
-
`,
|
|
26
|
-
${
|
|
25
|
+
`,S=`
|
|
26
|
+
${n}
|
|
27
27
|
query ScheduledJob($id: ID!) {
|
|
28
28
|
scheduledJob(id: $id) { ...ScheduledJobFields }
|
|
29
29
|
}
|
|
30
|
-
`,
|
|
31
|
-
${
|
|
30
|
+
`,h=`
|
|
31
|
+
${n}
|
|
32
32
|
mutation CreateScheduledJob($workspaceId: ID!, $input: CreateScheduledJobInput!) {
|
|
33
33
|
createScheduledJob(workspaceId: $workspaceId, input: $input) { ...ScheduledJobFields }
|
|
34
34
|
}
|
|
35
|
-
`,
|
|
36
|
-
${
|
|
35
|
+
`,E=`
|
|
36
|
+
${n}
|
|
37
37
|
mutation UpdateScheduledJob($id: ID!, $input: UpdateScheduledJobInput!) {
|
|
38
38
|
updateScheduledJob(id: $id, input: $input) { ...ScheduledJobFields }
|
|
39
39
|
}
|
|
40
|
-
`,
|
|
40
|
+
`,T=`
|
|
41
41
|
mutation DeleteScheduledJob($id: ID!) { deleteScheduledJob(id: $id) }
|
|
42
|
-
`,
|
|
43
|
-
${
|
|
42
|
+
`,b=`
|
|
43
|
+
${c}
|
|
44
44
|
query JobExecutions($jobId: ID!, $pagination: SchedulerPaginationInput) {
|
|
45
45
|
jobExecutions(jobId: $jobId, pagination: $pagination) {
|
|
46
46
|
edges { cursor node { ...JobExecutionFields } }
|
|
@@ -48,14 +48,190 @@ var i=`
|
|
|
48
48
|
pageInfo { hasNextPage endCursor }
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
|
-
`,
|
|
52
|
-
${
|
|
51
|
+
`,m=`
|
|
52
|
+
${c}
|
|
53
53
|
query JobExecution($id: ID!) {
|
|
54
54
|
jobExecution(id: $id) { ...JobExecutionFields }
|
|
55
55
|
}
|
|
56
|
-
`,
|
|
57
|
-
${
|
|
56
|
+
`,I=`
|
|
57
|
+
${c}
|
|
58
58
|
mutation RetryJobExecution($executionId: ID!) {
|
|
59
59
|
retryJobExecution(executionId: $executionId) { ...JobExecutionFields }
|
|
60
60
|
}
|
|
61
|
-
|
|
61
|
+
`,i=`
|
|
62
|
+
fragment ScheduleTemplateFields on ScheduleTemplate {
|
|
63
|
+
id name description category isPublic scheduleType executorType
|
|
64
|
+
scheduleConfig executorConfig payloadTemplate retryPolicy failurePolicy
|
|
65
|
+
circuitBreaker businessCalendarId workspaceId createdBy createdAt updatedAt usageCount
|
|
66
|
+
}
|
|
67
|
+
`,l=`
|
|
68
|
+
fragment ScheduledJobTagFields on ScheduledJobTagAssignment {
|
|
69
|
+
id entityId entityType tagId source assignedAt assignedBy
|
|
70
|
+
}
|
|
71
|
+
`,W=`
|
|
72
|
+
fragment ScheduleVersionFields on ScheduleVersion {
|
|
73
|
+
id scheduleId version changedBy changedFields changeReason config context createdAt
|
|
74
|
+
}
|
|
75
|
+
`,J=`
|
|
76
|
+
${n}
|
|
77
|
+
mutation PauseScheduledJob($id: ID!) {
|
|
78
|
+
pauseScheduledJob(id: $id) { ...ScheduledJobFields }
|
|
79
|
+
}
|
|
80
|
+
`,g=`
|
|
81
|
+
${n}
|
|
82
|
+
mutation ResumeScheduledJob($id: ID!) {
|
|
83
|
+
resumeScheduledJob(id: $id) { ...ScheduledJobFields }
|
|
84
|
+
}
|
|
85
|
+
`,$=`
|
|
86
|
+
${n}
|
|
87
|
+
mutation ActivateSchedule($id: ID!) {
|
|
88
|
+
activateSchedule(id: $id) { ...ScheduledJobFields }
|
|
89
|
+
}
|
|
90
|
+
`,x=`
|
|
91
|
+
${n}
|
|
92
|
+
mutation ArchiveSchedule($id: ID!) {
|
|
93
|
+
archiveSchedule(id: $id) { ...ScheduledJobFields }
|
|
94
|
+
}
|
|
95
|
+
`,A=`
|
|
96
|
+
${n}
|
|
97
|
+
mutation DisableSchedule($id: ID!, $reason: String) {
|
|
98
|
+
disableSchedule(id: $id, reason: $reason) { ...ScheduledJobFields }
|
|
99
|
+
}
|
|
100
|
+
`,C=`
|
|
101
|
+
${n}
|
|
102
|
+
mutation CloneSchedule(
|
|
103
|
+
$sourceId: ID!
|
|
104
|
+
$newWorkspaceId: ID
|
|
105
|
+
$overrides: CreateScheduledJobInput
|
|
106
|
+
) {
|
|
107
|
+
cloneSchedule(sourceId: $sourceId, newWorkspaceId: $newWorkspaceId, overrides: $overrides) {
|
|
108
|
+
...ScheduledJobFields
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
`,D=`
|
|
112
|
+
${c}
|
|
113
|
+
mutation ExecuteJobNow($id: ID!) {
|
|
114
|
+
executeJobNow(id: $id) { ...JobExecutionFields }
|
|
115
|
+
}
|
|
116
|
+
`,_=`
|
|
117
|
+
query PreviewSchedule(
|
|
118
|
+
$scheduleType: ScheduleType!
|
|
119
|
+
$cronExpression: String
|
|
120
|
+
$rrule: String
|
|
121
|
+
$interval: Int
|
|
122
|
+
$intervalUnit: String
|
|
123
|
+
$count: Int
|
|
124
|
+
$startDate: DateTime
|
|
125
|
+
$endDate: DateTime
|
|
126
|
+
$timezone: String
|
|
127
|
+
) {
|
|
128
|
+
previewSchedule(
|
|
129
|
+
scheduleType: $scheduleType
|
|
130
|
+
cronExpression: $cronExpression
|
|
131
|
+
rrule: $rrule
|
|
132
|
+
interval: $interval
|
|
133
|
+
intervalUnit: $intervalUnit
|
|
134
|
+
count: $count
|
|
135
|
+
startDate: $startDate
|
|
136
|
+
endDate: $endDate
|
|
137
|
+
timezone: $timezone
|
|
138
|
+
) {
|
|
139
|
+
count startDate endDate nextExecutions
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
`,y=`
|
|
143
|
+
${c}
|
|
144
|
+
subscription ExecutionUpdated($workspaceId: ID!, $scheduleId: ID, $executionId: ID) {
|
|
145
|
+
executionUpdated(workspaceId: $workspaceId, scheduleId: $scheduleId, executionId: $executionId) {
|
|
146
|
+
executionId scheduleId status success timestamp duration error output progress
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
`,U=`
|
|
150
|
+
subscription JobStatusUpdated($workspaceId: ID!, $scheduleId: ID) {
|
|
151
|
+
jobStatusUpdated(workspaceId: $workspaceId, scheduleId: $scheduleId) {
|
|
152
|
+
scheduleId scheduleName status previousStatus lastExecutionAt nextExecutionAt metadata timestamp
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
`,w=`
|
|
156
|
+
${n}
|
|
157
|
+
mutation CreateScheduleFromTemplate(
|
|
158
|
+
$templateId: ID!
|
|
159
|
+
$workspaceId: ID!
|
|
160
|
+
$overrides: CreateScheduledJobInput
|
|
161
|
+
) {
|
|
162
|
+
createScheduleFromTemplate(templateId: $templateId, workspaceId: $workspaceId, overrides: $overrides) {
|
|
163
|
+
...ScheduledJobFields
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
`,P=`
|
|
167
|
+
${i}
|
|
168
|
+
mutation CreateScheduleTemplate($input: CreateScheduleTemplateInput!, $workspaceId: ID!) {
|
|
169
|
+
createScheduleTemplate(input: $input, workspaceId: $workspaceId) { ...ScheduleTemplateFields }
|
|
170
|
+
}
|
|
171
|
+
`,L=`
|
|
172
|
+
${i}
|
|
173
|
+
mutation UpdateScheduleTemplate($id: ID!, $input: UpdateScheduleTemplateInput!) {
|
|
174
|
+
updateScheduleTemplate(id: $id, input: $input) { ...ScheduleTemplateFields }
|
|
175
|
+
}
|
|
176
|
+
`,v=`
|
|
177
|
+
mutation DeleteScheduleTemplate($id: ID!) { deleteScheduleTemplate(id: $id) }
|
|
178
|
+
`,f=`
|
|
179
|
+
${i}
|
|
180
|
+
query ScheduleTemplate($id: ID!) {
|
|
181
|
+
scheduleTemplate(id: $id) { ...ScheduleTemplateFields }
|
|
182
|
+
}
|
|
183
|
+
`,F=`
|
|
184
|
+
${i}
|
|
185
|
+
query ScheduleTemplates(
|
|
186
|
+
$workspaceId: ID!
|
|
187
|
+
$filter: ScheduleTemplateFilterInput
|
|
188
|
+
$pagination: SchedulerPaginationInput
|
|
189
|
+
) {
|
|
190
|
+
scheduleTemplates(workspaceId: $workspaceId, filter: $filter, pagination: $pagination) {
|
|
191
|
+
templates { ...ScheduleTemplateFields }
|
|
192
|
+
total
|
|
193
|
+
nextCursor
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
`,k=`
|
|
197
|
+
${i}
|
|
198
|
+
query PublicScheduleTemplates(
|
|
199
|
+
$filter: ScheduleTemplateFilterInput
|
|
200
|
+
$pagination: SchedulerPaginationInput
|
|
201
|
+
) {
|
|
202
|
+
publicScheduleTemplates(filter: $filter, pagination: $pagination) {
|
|
203
|
+
templates { ...ScheduleTemplateFields }
|
|
204
|
+
total
|
|
205
|
+
nextCursor
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
`,O=`
|
|
209
|
+
${l}
|
|
210
|
+
mutation TagScheduledJob($input: TagScheduledJobInput!) {
|
|
211
|
+
tagScheduledJob(input: $input) { ...ScheduledJobTagFields }
|
|
212
|
+
}
|
|
213
|
+
`,q=`
|
|
214
|
+
mutation UntagScheduledJob($input: UntagScheduledJobInput!) {
|
|
215
|
+
untagScheduledJob(input: $input)
|
|
216
|
+
}
|
|
217
|
+
`,R=`
|
|
218
|
+
${l}
|
|
219
|
+
mutation ReplaceScheduledJobTags($input: ReplaceScheduledJobTagsInput!) {
|
|
220
|
+
replaceScheduledJobTags(input: $input) { ...ScheduledJobTagFields }
|
|
221
|
+
}
|
|
222
|
+
`,H=`
|
|
223
|
+
${l}
|
|
224
|
+
query GetScheduledJobTags($input: GetScheduledJobTagsInput!) {
|
|
225
|
+
getScheduledJobTags(input: $input) { ...ScheduledJobTagFields }
|
|
226
|
+
}
|
|
227
|
+
`,B=`
|
|
228
|
+
${W}
|
|
229
|
+
query ScheduleVersionHistory($scheduleId: ID!) {
|
|
230
|
+
scheduleVersionHistory(scheduleId: $scheduleId) { ...ScheduleVersionFields }
|
|
231
|
+
}
|
|
232
|
+
`,N=`
|
|
233
|
+
${n}
|
|
234
|
+
mutation RestoreScheduleVersion($scheduleId: ID!, $versionId: ID!) {
|
|
235
|
+
restoreScheduleVersion(scheduleId: $scheduleId, versionId: $versionId) { ...ScheduledJobFields }
|
|
236
|
+
}
|
|
237
|
+
`;function V(a){let{workspace:d}=a.gql;return {async list(e,t){return (await d.request(b,{jobId:e,pagination:t})).jobExecutions},async get(e){return (await d.request(m,{id:e})).jobExecution},async retry(e){return (await d.request(I,{executionId:e})).retryJobExecution},updatedSubscription(){return {query:y,variablesFor({workspaceId:e,scheduleId:t,executionId:o}){return {workspaceId:e,scheduleId:t??null,executionId:o??null}}}}}}function M(a){let{workspace:d}=a.gql;return {async list(e,t,o){return (await d.request(p,{workspaceId:e,filter:t,pagination:o})).scheduledJobs},async get(e){return (await d.request(S,{id:e})).scheduledJob},async create(e,t){return (await d.request(h,{workspaceId:e,input:t})).createScheduledJob},async update(e,t){return (await d.request(E,{id:e,input:t})).updateScheduledJob},async delete(e){return (await d.request(T,{id:e})).deleteScheduledJob},async pause(e){return (await d.request(J,{id:e})).pauseScheduledJob},async resume(e){return (await d.request(g,{id:e})).resumeScheduledJob},async activate(e){return (await d.request($,{id:e})).activateSchedule},async archive(e){return (await d.request(x,{id:e})).archiveSchedule},async disable(e,t){return (await d.request(A,{id:e,reason:t??null})).disableSchedule},async clone({sourceId:e,newWorkspaceId:t,overrides:o}){return (await d.request(C,{sourceId:e,newWorkspaceId:t??null,overrides:o??null})).cloneSchedule},async executeNow(e){return (await d.request(D,{id:e})).executeJobNow},async preview(e){return (await d.request(_,{scheduleType:e.scheduleType,cronExpression:e.cronExpression??null,rrule:e.rrule??null,interval:e.interval??null,intervalUnit:e.intervalUnit??null,count:e.count??null,startDate:e.startDate??null,endDate:e.endDate??null,timezone:e.timezone??null})).previewSchedule},statusUpdatedSubscription(){return {query:U,variablesFor({workspaceId:e,scheduleId:t}){return {workspaceId:e,scheduleId:t??null}}}}}}function G(a){let{workspace:d}=a.gql;return {async add(e){return (await d.request(O,{input:e})).tagScheduledJob},async remove(e){return (await d.request(q,{input:e})).untagScheduledJob},async replace(e){return (await d.request(R,{input:e})).replaceScheduledJobTags},async list(e){return (await d.request(H,{input:e})).getScheduledJobTags}}}function j(a){let{workspace:d}=a.gql;return {async list(e,t,o){return (await d.request(F,{workspaceId:e,filter:t,pagination:o})).scheduleTemplates},async listPublic(e,t){return (await d.request(k,{filter:e,pagination:t})).publicScheduleTemplates},async get(e){return (await d.request(f,{id:e})).scheduleTemplate},async create(e,t){return (await d.request(P,{workspaceId:e,input:t})).createScheduleTemplate},async update(e,t){return (await d.request(L,{id:e,input:t})).updateScheduleTemplate},async delete(e){return (await d.request(v,{id:e})).deleteScheduleTemplate},async createScheduleFromTemplate({templateId:e,workspaceId:t,overrides:o}){return (await d.request(w,{templateId:e,workspaceId:t,overrides:o??null})).createScheduleFromTemplate}}}function X(a){let{workspace:d}=a.gql;return {async history(e){return (await d.request(B,{scheduleId:e})).scheduleVersionHistory},async restore(e,t){return (await d.request(N,{scheduleId:e,versionId:t})).restoreScheduleVersion}}}var z={id:"scheduler",version:"1.0.0",displayName:"Scheduler",dependsOn:["auth"],attach(a){return {jobs:M(a),executions:V(a),templates:j(a),tags:G(a),versions:X(a)}}},me=z;export{me as default};
|
|
@@ -1,82 +1,104 @@
|
|
|
1
|
-
'use strict';var n=`
|
|
1
|
+
'use strict';var b=["password","secret","clientSecret","apiKey","token","mfaCode","accessToken","refreshToken","workspaceToken","authorization"],$=/\b(eyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+)\b/g;function L(e){let r=e.replace($,"<redacted-jwt>");for(let t of b){let s=new RegExp(`("${t}"\\s*:\\s*")[^"]*(")`,"gi");r=r.replace(s,"$1<redacted>$2");}return r}var n=class extends Error{code;cause;constructor(r,t="SDK_ERROR",s){super(L(r)),this.name="SdkError",this.code=t,this.cause=s;}};var d=`
|
|
2
2
|
fragment StoreProductFields on StoreProduct {
|
|
3
|
-
id name description price currency type status
|
|
4
|
-
publisher { name }
|
|
3
|
+
id name slug description price currency type status downloads
|
|
4
|
+
publisher { id name isVerified }
|
|
5
5
|
}
|
|
6
|
-
`,
|
|
6
|
+
`,a=`
|
|
7
7
|
fragment CartFields on Cart {
|
|
8
8
|
id currency subtotal total itemCount isEmpty
|
|
9
|
-
items {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
id status total currency paidAt billingAccountId createdAt
|
|
14
|
-
lineItems { productId quantity unitPrice }
|
|
9
|
+
items {
|
|
10
|
+
id productId quantity unitPrice subtotal
|
|
11
|
+
productName variantId workspaceId
|
|
12
|
+
}
|
|
15
13
|
}
|
|
16
14
|
`,c=`
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
fragment OrderFields on StoreOrder {
|
|
16
|
+
id status total currency purchasedAt billingAccountId createdAt
|
|
17
|
+
lineItems
|
|
20
18
|
}
|
|
21
19
|
`,l=`
|
|
22
|
-
${
|
|
23
|
-
query
|
|
24
|
-
|
|
20
|
+
${d}
|
|
21
|
+
query SearchStore($query: String!, $limit: Int, $offset: Int) {
|
|
22
|
+
searchProducts(query: $query, limit: $limit, offset: $offset) { ...StoreProductFields }
|
|
25
23
|
}
|
|
26
24
|
`,u=`
|
|
27
|
-
${
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
${a}
|
|
26
|
+
query MyCart {
|
|
27
|
+
myCart { ...CartFields }
|
|
30
28
|
}
|
|
31
29
|
`,p=`
|
|
32
|
-
${
|
|
33
|
-
mutation
|
|
34
|
-
|
|
30
|
+
${a}
|
|
31
|
+
mutation AddToCart($input: AddToCartInput!) {
|
|
32
|
+
addToCart(input: $input) {
|
|
33
|
+
cart { ...CartFields }
|
|
34
|
+
errors { code field message }
|
|
35
|
+
}
|
|
35
36
|
}
|
|
36
37
|
`,m=`
|
|
37
|
-
${
|
|
38
|
-
mutation
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
query GetOrders($limit: Int, $offset: Int) {
|
|
44
|
-
getOrders(limit: $limit, offset: $offset) { ...OrderFields }
|
|
45
|
-
}
|
|
46
|
-
`,C=`
|
|
47
|
-
${d}
|
|
48
|
-
query GetOrder($id: ID!) {
|
|
49
|
-
getOrder(id: $id) { ...OrderFields }
|
|
38
|
+
${a}
|
|
39
|
+
mutation RemoveFromCart($cartItemId: String!) {
|
|
40
|
+
removeFromCart(cartItemId: $cartItemId) {
|
|
41
|
+
cart { ...CartFields }
|
|
42
|
+
errors { code field message }
|
|
43
|
+
}
|
|
50
44
|
}
|
|
51
45
|
`,A=`
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
46
|
+
${a}
|
|
47
|
+
mutation ClearCart {
|
|
48
|
+
clearCart {
|
|
49
|
+
cart { ...CartFields }
|
|
50
|
+
errors { code field message }
|
|
56
51
|
}
|
|
57
52
|
}
|
|
58
53
|
`,S=`
|
|
59
|
-
|
|
60
|
-
|
|
54
|
+
${c}
|
|
55
|
+
query MyOrders($limit: Int, $offset: Int, $status: OrderStatus) {
|
|
56
|
+
myOrders(limit: $limit, offset: $offset, status: $status) { ...OrderFields }
|
|
61
57
|
}
|
|
62
|
-
`,
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
58
|
+
`,f=`
|
|
59
|
+
${c}
|
|
60
|
+
query GetStoreOrder($id: ID!) {
|
|
61
|
+
getStoreOrder(id: $id) { ...OrderFields }
|
|
62
|
+
}
|
|
63
|
+
`,C=`
|
|
64
|
+
query MyStoreAppInstallations($filter: InstallationFilterInput, $limit: Int, $offset: Int) {
|
|
65
|
+
myStoreAppInstallations(filter: $filter, limit: $limit, offset: $offset) {
|
|
66
|
+
items {
|
|
67
|
+
id productId workspaceId workspaceName status
|
|
68
|
+
installedAt updatedAt uninstalledAt version
|
|
69
|
+
}
|
|
70
|
+
total
|
|
71
|
+
hasMore
|
|
66
72
|
}
|
|
67
73
|
}
|
|
68
|
-
`,
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
id
|
|
74
|
+
`,I=`
|
|
75
|
+
mutation RecordAppUninstallation($productId: String!, $workspaceId: String!) {
|
|
76
|
+
recordAppUninstallation(productId: $productId, workspaceId: $workspaceId) {
|
|
77
|
+
id productId workspaceId status uninstalledAt updatedAt
|
|
72
78
|
}
|
|
73
79
|
}
|
|
74
80
|
`,y=`
|
|
75
|
-
${
|
|
76
|
-
|
|
77
|
-
|
|
81
|
+
query EntitlementSeats($entitlementId: ID!) {
|
|
82
|
+
entitlementSeats(entitlementId: $entitlementId) {
|
|
83
|
+
id entitlementId assigneeUserId assigneeEmail role
|
|
84
|
+
assignedAt revokedAt revocationReason
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
`,R=`
|
|
88
|
+
query MyPublisher {
|
|
89
|
+
myPublisher {
|
|
90
|
+
id name legalName email contactEmail websiteUrl
|
|
91
|
+
bio logoUrl isVerified verificationStatus
|
|
92
|
+
productCount totalSales totalEarnings tier
|
|
93
|
+
createdAt updatedAt
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
`,P=`
|
|
97
|
+
${d}
|
|
98
|
+
query MyPublisherProducts {
|
|
99
|
+
myPublisher {
|
|
100
|
+
id productCount
|
|
78
101
|
products { ...StoreProductFields }
|
|
79
|
-
totalCount
|
|
80
102
|
}
|
|
81
103
|
}
|
|
82
|
-
`;function
|
|
104
|
+
`;function i(e,r){if(e.errors&&e.errors.length>0){let t=e.errors[0];throw new n(`store.cart.${r}: ${t.code} ${t.message}`,t.code,{field:t.field,errors:e.errors})}if(!e.cart)throw new n(`store.cart.${r}: server returned empty cart`,"EMPTY_CART_PAYLOAD");return e.cart}function O(e){let{global:r}=e.gql;return {async get(){return (await r.request(u)).myCart},async add(t){let s=await r.request(p,{input:t});return i(s.addToCart,"add")},async remove(t){let s=await r.request(m,{cartItemId:t});return i(s.removeFromCart,"remove")},async clear(){let t=await r.request(A);return i(t.clearCart,"clear")}}}function E(e){let{global:r}=e.gql;return {async list(t){return (await r.request(C,{filter:t?.filter,limit:t?.limit,offset:t?.offset})).myStoreAppInstallations},async uninstall(t,s){return (await r.request(I,{productId:t,workspaceId:s})).recordAppUninstallation}}}function h(e){let{global:r}=e.gql;return {async list(t){return (await r.request(y,{entitlementId:t})).entitlementSeats}}}function x(e){let{global:r}=e.gql;return {async list(t){return (await r.request(S,{limit:t?.limit,offset:t?.offset,status:t?.status})).myOrders},async get(t){return (await r.request(f,{id:t})).getStoreOrder}}}function T(e){let{global:r}=e.gql;return {async me(){return (await r.request(R)).myPublisher},async myProducts(){let s=(await r.request(P)).myPublisher;return s?{publisherId:s.id,productCount:s.productCount,products:s.products}:null}}}function _(e){let{global:r}=e.gql;return {async search(t,s){return (await r.request(l,{query:t,limit:s?.limit,offset:s?.offset})).searchProducts}}}var k={id:"store",version:"1.0.0",displayName:"Store",dependsOn:["auth"],attach(e){return {search:_(e),cart:O(e),orders:x(e),installed:E(e),licenses:h(e),publisher:T(e)}}},dt=k;module.exports=dt;
|
|
@@ -1,129 +1,176 @@
|
|
|
1
1
|
import { J as Json, S as SdkModule } from '../../module-JDbvil5h.cjs';
|
|
2
2
|
import 'graphql-request';
|
|
3
3
|
|
|
4
|
-
type StoreProductType = 'APP' | 'INTEGRATION' | 'TEMPLATE' | 'EXTENSION';
|
|
4
|
+
type StoreProductType = 'APP' | 'INTEGRATION' | 'TEMPLATE' | 'EXTENSION' | 'NODE' | 'WIDGET' | 'AGENT' | 'BUNDLE' | 'PRODUCT' | 'PROMPT' | 'WORKFLOW' | 'THEME';
|
|
5
5
|
interface StoreProduct {
|
|
6
6
|
id: string;
|
|
7
7
|
name: string;
|
|
8
|
+
slug?: string | null;
|
|
8
9
|
description?: string | null;
|
|
9
10
|
price?: number | null;
|
|
10
11
|
currency?: string | null;
|
|
11
12
|
type: StoreProductType;
|
|
12
13
|
status?: string | null;
|
|
13
|
-
|
|
14
|
+
downloads?: number | null;
|
|
14
15
|
publisher?: {
|
|
16
|
+
id: string;
|
|
15
17
|
name: string;
|
|
18
|
+
isVerified?: boolean | null;
|
|
16
19
|
} | null;
|
|
17
20
|
}
|
|
18
|
-
interface
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
publisherId?: string;
|
|
22
|
-
minPrice?: number;
|
|
23
|
-
maxPrice?: number;
|
|
24
|
-
currency?: string;
|
|
21
|
+
interface StoreSearchOptions {
|
|
22
|
+
limit?: number;
|
|
23
|
+
offset?: number;
|
|
25
24
|
}
|
|
26
25
|
interface CartItem {
|
|
27
26
|
id: string;
|
|
28
27
|
productId: string;
|
|
28
|
+
productName: string;
|
|
29
29
|
quantity: number;
|
|
30
|
-
|
|
30
|
+
unitPrice: number;
|
|
31
|
+
subtotal: number;
|
|
32
|
+
variantId?: string | null;
|
|
33
|
+
workspaceId?: string | null;
|
|
31
34
|
}
|
|
32
35
|
interface Cart {
|
|
33
36
|
id: string;
|
|
34
|
-
currency
|
|
35
|
-
subtotal
|
|
36
|
-
total
|
|
37
|
+
currency: string;
|
|
38
|
+
subtotal: number;
|
|
39
|
+
total: number;
|
|
37
40
|
itemCount: number;
|
|
38
41
|
isEmpty: boolean;
|
|
39
42
|
items: CartItem[];
|
|
40
43
|
}
|
|
44
|
+
interface CartError {
|
|
45
|
+
code: string;
|
|
46
|
+
field?: string | null;
|
|
47
|
+
message: string;
|
|
48
|
+
}
|
|
49
|
+
interface CartPayload {
|
|
50
|
+
cart?: Cart | null;
|
|
51
|
+
errors?: CartError[] | null;
|
|
52
|
+
}
|
|
41
53
|
interface AddToCartInput {
|
|
42
54
|
productId: string;
|
|
43
55
|
quantity?: number;
|
|
44
|
-
|
|
56
|
+
variantId?: string;
|
|
57
|
+
workspaceId?: string;
|
|
45
58
|
}
|
|
46
59
|
type OrderStatus = 'PENDING' | 'PROCESSING' | 'COMPLETED' | 'CANCELLED' | 'REFUNDED' | 'FAILED';
|
|
47
60
|
interface Order {
|
|
48
61
|
id: string;
|
|
49
62
|
status: OrderStatus;
|
|
50
|
-
total
|
|
51
|
-
currency
|
|
52
|
-
|
|
53
|
-
billingAccountId
|
|
63
|
+
total: number;
|
|
64
|
+
currency: string;
|
|
65
|
+
purchasedAt?: string | null;
|
|
66
|
+
billingAccountId: string;
|
|
54
67
|
createdAt: string;
|
|
55
|
-
lineItems
|
|
56
|
-
productId: string;
|
|
57
|
-
quantity: number;
|
|
58
|
-
unitPrice?: number | null;
|
|
59
|
-
}> | null;
|
|
68
|
+
lineItems: Json;
|
|
60
69
|
}
|
|
61
70
|
interface InstalledProduct {
|
|
62
71
|
id: string;
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
};
|
|
72
|
+
productId: string;
|
|
73
|
+
workspaceId: string;
|
|
74
|
+
workspaceName?: string | null;
|
|
67
75
|
status: string;
|
|
68
76
|
installedAt: string;
|
|
69
|
-
|
|
77
|
+
updatedAt: string;
|
|
78
|
+
uninstalledAt?: string | null;
|
|
79
|
+
version?: string | null;
|
|
70
80
|
}
|
|
71
|
-
interface
|
|
81
|
+
interface InstalledProductsResult {
|
|
82
|
+
items: InstalledProduct[];
|
|
83
|
+
total: number;
|
|
84
|
+
hasMore: boolean;
|
|
85
|
+
}
|
|
86
|
+
interface InstallationFilterInput {
|
|
87
|
+
productId?: string;
|
|
88
|
+
workspaceId?: string;
|
|
89
|
+
status?: string;
|
|
90
|
+
}
|
|
91
|
+
interface UninstallResult {
|
|
72
92
|
id: string;
|
|
93
|
+
productId: string;
|
|
94
|
+
workspaceId: string;
|
|
73
95
|
status: string;
|
|
74
|
-
|
|
75
|
-
|
|
96
|
+
uninstalledAt?: string | null;
|
|
97
|
+
updatedAt: string;
|
|
76
98
|
}
|
|
99
|
+
type LicenseSeatRole = 'ADMIN' | 'MEMBER' | 'VIEWER';
|
|
100
|
+
interface License {
|
|
101
|
+
id: string;
|
|
102
|
+
entitlementId: string;
|
|
103
|
+
assigneeUserId: string;
|
|
104
|
+
assigneeEmail?: string | null;
|
|
105
|
+
role: LicenseSeatRole;
|
|
106
|
+
assignedAt: string;
|
|
107
|
+
revokedAt?: string | null;
|
|
108
|
+
revocationReason?: string | null;
|
|
109
|
+
}
|
|
110
|
+
type PublisherTier = 'INDIVIDUAL' | 'ORGANIZATION' | 'ENTERPRISE';
|
|
111
|
+
type PublisherVerificationStatus = 'UNVERIFIED' | 'PENDING_VERIFICATION' | 'VERIFIED' | 'REJECTED' | 'SUSPENDED';
|
|
77
112
|
interface Publisher {
|
|
78
113
|
id: string;
|
|
79
114
|
name: string;
|
|
80
|
-
|
|
81
|
-
|
|
115
|
+
legalName?: string | null;
|
|
116
|
+
email: string;
|
|
82
117
|
contactEmail?: string | null;
|
|
83
|
-
|
|
84
|
-
|
|
118
|
+
websiteUrl?: string | null;
|
|
119
|
+
bio?: string | null;
|
|
120
|
+
logoUrl?: string | null;
|
|
121
|
+
isVerified: boolean;
|
|
122
|
+
verificationStatus: PublisherVerificationStatus;
|
|
123
|
+
productCount: number;
|
|
124
|
+
totalSales: number;
|
|
125
|
+
totalEarnings: number;
|
|
126
|
+
tier: PublisherTier;
|
|
127
|
+
createdAt: string;
|
|
128
|
+
updatedAt: string;
|
|
85
129
|
}
|
|
86
130
|
interface PublisherProductsResult {
|
|
131
|
+
publisherId: string;
|
|
132
|
+
productCount: number;
|
|
87
133
|
products: StoreProduct[];
|
|
88
|
-
totalCount: number;
|
|
89
134
|
}
|
|
90
135
|
|
|
91
136
|
interface CartApi {
|
|
92
|
-
get(): Promise<Cart>;
|
|
137
|
+
get(): Promise<Cart | null>;
|
|
93
138
|
add(input: AddToCartInput): Promise<Cart>;
|
|
94
|
-
remove(
|
|
95
|
-
clear(
|
|
139
|
+
remove(cartItemId: string): Promise<Cart>;
|
|
140
|
+
clear(): Promise<Cart>;
|
|
96
141
|
}
|
|
97
142
|
|
|
143
|
+
interface InstalledListOptions {
|
|
144
|
+
filter?: InstallationFilterInput;
|
|
145
|
+
limit?: number;
|
|
146
|
+
offset?: number;
|
|
147
|
+
}
|
|
98
148
|
interface InstalledApi {
|
|
99
|
-
list(
|
|
100
|
-
uninstall(
|
|
101
|
-
success: boolean;
|
|
102
|
-
}>;
|
|
149
|
+
list(opts?: InstalledListOptions): Promise<InstalledProductsResult>;
|
|
150
|
+
uninstall(productId: string, workspaceId: string): Promise<UninstallResult>;
|
|
103
151
|
}
|
|
104
152
|
|
|
105
153
|
interface LicensesApi {
|
|
106
154
|
list(entitlementId: string): Promise<License[]>;
|
|
107
155
|
}
|
|
108
156
|
|
|
157
|
+
interface OrdersListOptions {
|
|
158
|
+
limit?: number;
|
|
159
|
+
offset?: number;
|
|
160
|
+
status?: OrderStatus;
|
|
161
|
+
}
|
|
109
162
|
interface OrdersApi {
|
|
110
|
-
list(opts?:
|
|
111
|
-
limit?: number;
|
|
112
|
-
offset?: number;
|
|
113
|
-
}): Promise<Order[]>;
|
|
163
|
+
list(opts?: OrdersListOptions): Promise<Order[]>;
|
|
114
164
|
get(id: string): Promise<Order | null>;
|
|
115
165
|
}
|
|
116
166
|
|
|
117
167
|
interface PublisherApi {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
limit?: number;
|
|
121
|
-
offset?: number;
|
|
122
|
-
}): Promise<PublisherProductsResult>;
|
|
168
|
+
me(): Promise<Publisher | null>;
|
|
169
|
+
myProducts(): Promise<PublisherProductsResult | null>;
|
|
123
170
|
}
|
|
124
171
|
|
|
125
172
|
interface SearchApi {
|
|
126
|
-
search(query: string,
|
|
173
|
+
search(query: string, opts?: StoreSearchOptions): Promise<StoreProduct[]>;
|
|
127
174
|
}
|
|
128
175
|
|
|
129
176
|
interface StoreApi {
|
|
@@ -136,4 +183,4 @@ interface StoreApi {
|
|
|
136
183
|
}
|
|
137
184
|
declare const storeModule: SdkModule<StoreApi>;
|
|
138
185
|
|
|
139
|
-
export { type AddToCartInput, type Cart, type CartApi, type CartItem, type InstalledApi, type InstalledProduct, type License, type LicensesApi, type Order, type OrderStatus, type OrdersApi, type Publisher, type PublisherApi, type PublisherProductsResult, type
|
|
186
|
+
export { type AddToCartInput, type Cart, type CartApi, type CartError, type CartItem, type CartPayload, type InstallationFilterInput, type InstalledApi, type InstalledProduct, type InstalledProductsResult, type License, type LicenseSeatRole, type LicensesApi, type Order, type OrderStatus, type OrdersApi, type Publisher, type PublisherApi, type PublisherProductsResult, type PublisherTier, type PublisherVerificationStatus, type SearchApi, type StoreApi, type StoreProduct, type StoreProductType, type StoreSearchOptions, type UninstallResult, storeModule as default };
|