@burdenoff/sdk-libs 2026.522.1 → 2026.523.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.
@@ -1,37 +1,44 @@
1
- var l=`
1
+ var A=`
2
2
  query DevportalOrganizations($limit: Int, $offset: Int) {
3
- organizations(limit: $limit, offset: $offset) {
4
- edges { node { id name slug description status createdAt updatedAt } }
3
+ developerOrganizations(limit: $limit, offset: $offset) {
4
+ edges { node {
5
+ id name slug description createdAt updatedAt
6
+ isVerified isCertified tier
7
+ totalApps publishedApps totalRevenue
8
+ } cursor }
5
9
  totalCount
6
- pageInfo { hasNextPage }
7
- }
8
- }
9
- `,A=`
10
- query DevportalOrganization($id: ID!) {
11
- organization(id: $id) {
12
- id name slug description status createdAt updatedAt
10
+ pageInfo { hasNextPage hasPreviousPage startCursor endCursor }
13
11
  }
14
12
  }
15
13
  `,d=`
16
- mutation CreateDevportalOrganization($input: CreateOrganizationInput!) {
17
- createOrganization(input: $input) {
18
- id name slug description status
14
+ query DevportalOrganization($id: ID!) {
15
+ developerOrganization(id: $id) {
16
+ id name slug description createdAt updatedAt
17
+ isVerified isCertified tier
18
+ totalApps publishedApps totalRevenue
19
+ contactEmail supportEmail websiteUrl
19
20
  }
20
21
  }
21
22
  `,u=`
22
- mutation UpdateDevportalOrganization($id: ID!, $input: UpdateOrganizationInput!) {
23
- updateOrganization(id: $id, input: $input) {
24
- id name description status updatedAt
23
+ mutation CreateDevportalOrganization($input: CreateDeveloperOrganizationInput!) {
24
+ createDeveloperOrganization(input: $input) {
25
+ id name slug description tier
25
26
  }
26
27
  }
27
28
  `,I=`
28
- mutation DeleteDevportalOrganization($id: ID!) {
29
- deleteOrganization(id: $id) { success }
29
+ mutation UpdateDevportalOrganization($id: ID!, $input: UpdateDeveloperOrganizationInput!) {
30
+ updateDeveloperOrganization(id: $id, input: $input) {
31
+ id name description updatedAt
32
+ }
30
33
  }
31
34
  `,m=`
35
+ mutation DeleteDevportalOrganization($id: ID!) {
36
+ deleteDeveloperOrganization(id: $id)
37
+ }
38
+ `,g=`
32
39
  query DevportalApplications(
33
40
  $organizationId: ID
34
- $status: String
41
+ $status: AppStatus
35
42
  $limit: Int
36
43
  $offset: Int
37
44
  ) {
@@ -44,11 +51,12 @@ var l=`
44
51
  edges { node {
45
52
  id appId name description status reviewStatus publishedAt
46
53
  installCount averageRating createdAt updatedAt
47
- } }
54
+ } cursor }
48
55
  totalCount
56
+ pageInfo { hasNextPage hasPreviousPage startCursor endCursor }
49
57
  }
50
58
  }
51
- `,g=`
59
+ `,v=`
52
60
  query DevportalApplication($id: ID!) {
53
61
  application(id: $id) {
54
62
  id appId name description status reviewStatus publishedAt
@@ -67,29 +75,34 @@ var l=`
67
75
  id name description updatedAt
68
76
  }
69
77
  }
70
- `,v=`
78
+ `,C=`
71
79
  mutation SubmitDevportalApplicationForReview($id: ID!, $notes: String) {
72
80
  submitApplicationForReview(id: $id, notes: $notes) {
73
81
  id status reviewStatus submittedAt
74
82
  }
75
83
  }
76
- `,C=`
84
+ `,y=`
77
85
  mutation PublishDevportalApplication($id: ID!) {
78
86
  publishApplication(id: $id) {
79
87
  id status publishedAt
80
88
  }
81
89
  }
82
- `,y=`
90
+ `,E=`
83
91
  mutation DeleteDevportalApplication($id: ID!) {
84
- deleteApplication(id: $id) { success }
92
+ deleteApplication(id: $id)
85
93
  }
86
- `,E=`
94
+ `,T=`
87
95
  query DevportalApplicationVersions($applicationId: ID!) {
88
- applicationVersions(applicationId: $applicationId) {
89
- id applicationId version status isLatest isStable releaseNotes publishedAt
96
+ application(id: $applicationId) {
97
+ versions {
98
+ edges { node {
99
+ id applicationId version status isLatest isStable releaseNotes publishedAt
100
+ } }
101
+ totalCount
102
+ }
90
103
  }
91
104
  }
92
- `,T=`
105
+ `,P=`
93
106
  mutation CreateDevportalApplicationVersion(
94
107
  $applicationId: ID!
95
108
  $input: CreateApplicationVersionInput!
@@ -124,35 +137,35 @@ var l=`
124
137
  date period activeUsers apiCalls avgResponseTime sessions
125
138
  }
126
139
  }
127
- `,P=`
140
+ `,b=`
128
141
  query DevportalOAuthClients($applicationId: ID!) {
129
142
  oauthClients(applicationId: $applicationId) {
130
143
  id applicationId clientId name redirectUris grantTypes isActive createdAt
131
144
  }
132
145
  }
133
- `,b=`
146
+ `,$=`
134
147
  mutation CreateDevportalOAuthClient($input: CreateOAuthClientInput!) {
135
148
  createOAuthClient(input: $input) {
136
149
  id applicationId clientId clientSecret name redirectUris grantTypes isActive createdAt
137
150
  }
138
151
  }
139
- `,$=`
152
+ `,k=`
140
153
  mutation DeleteDevportalOAuthClient($id: ID!) {
141
154
  deleteOAuthClient(id: $id) { success }
142
155
  }
143
- `,k=`
156
+ `,S=`
144
157
  query DevportalApiKeys($applicationId: ID!) {
145
158
  apiKeys(applicationId: $applicationId) {
146
159
  id applicationId name prefix scopes lastUsedAt isActive createdAt
147
160
  }
148
161
  }
149
- `,S=`
162
+ `,x=`
150
163
  mutation CreateDevportalApiKey($input: CreateApiKeyInput!) {
151
164
  createApiKey(input: $input) {
152
165
  id applicationId name prefix token scopes isActive createdAt
153
166
  }
154
167
  }
155
- `,x=`
168
+ `,R=`
156
169
  mutation RevokeDevportalApiKey($id: ID!) {
157
170
  revokeApiKey(id: $id) { success }
158
171
  }
@@ -168,49 +181,51 @@ var l=`
168
181
  id applicationId workspaceId scopes status expiresAt
169
182
  }
170
183
  }
171
- `,R=`
184
+ `,w=`
172
185
  mutation RevokeDevportalDelegation($id: ID!) {
173
186
  revokeDelegation(id: $id) { success }
174
187
  }
175
- `,r=`
188
+ `,s=`
176
189
  query DevportalWebhooks($applicationId: ID!) {
177
190
  webhooks(applicationId: $applicationId) {
178
191
  id name url events isActive status failureCount
179
192
  }
180
193
  }
181
- `,s=`
182
- mutation CreateDevportalWebhook($input: CreateWebhookInput!) {
183
- createWebhook(input: $input) {
194
+ `,l=`
195
+ mutation CreateDevportalWebhook($applicationId: ID!, $input: CreateWebhookInput!) {
196
+ createWebhook(applicationId: $applicationId, input: $input) {
184
197
  id name url status isActive
185
198
  }
186
199
  }
187
200
  `,c=`
188
201
  mutation DeleteDevportalWebhook($id: ID!) {
189
- deleteWebhook(id: $id) { success }
202
+ deleteWebhook(id: $id)
190
203
  }
191
- `,w=`
204
+ `,N=`
192
205
  query DevportalOrganizationRevenue($organizationId: ID!, $period: String!) {
193
- organizationRevenue(organizationId: $organizationId, period: $period) {
194
- totalEarnings currency netEarnings
206
+ developerOrgRevenueSummary(organizationId: $organizationId, period: $period) {
207
+ period
208
+ totalGrossRevenue totalNetRevenue
209
+ pendingBalance nextPayoutAmount nextPayoutDate
195
210
  }
196
211
  }
197
- `,N=`
212
+ `,W=`
198
213
  query DevportalAdminReviews($status: String) {
199
214
  adminReviews(status: $status) {
200
215
  edges { node { id applicationId reviewStatus reviewNotes } }
201
216
  totalCount
202
217
  }
203
218
  }
204
- `,W=`
219
+ `,q=`
205
220
  mutation DevportalApproveApplication($id: ID!, $notes: String) {
206
221
  approveApplication(id: $id, notes: $notes) {
207
222
  id status reviewStatus publishedAt
208
223
  }
209
224
  }
210
- `,q=`
225
+ `,z=`
211
226
  mutation DevportalRejectApplication($id: ID!, $notes: String!) {
212
227
  rejectApplication(id: $id, notes: $notes) {
213
228
  id status reviewStatus reviewNotes
214
229
  }
215
230
  }
216
- `;function z(a){let{global:i}=a.gql;return {reviews:{async list(t){return (await i.request(N,{status:t?.status})).adminReviews},async approve(t,e){return (await i.request(W,{id:t,notes:e})).approveApplication},async reject(t,e){return (await i.request(q,{id:t,notes:e})).rejectApplication}}}}function K(a){let{global:i}=a.gql;return {async list(t){return (await i.request(k,{applicationId:t})).apiKeys},async create(t){return (await i.request(S,{input:t})).createApiKey},async revoke(t){return (await i.request(x,{id:t})).revokeApiKey}}}function V(a){let{global:i}=a.gql;return {async list(t){return (await i.request(m,{organizationId:t?.organizationId,status:t?.status,limit:t?.limit,offset:t?.offset})).applications},async get(t){return (await i.request(g,{id:t})).application},async create(t){return (await i.request(D,{input:t})).createApplication},async update(t,e){return (await i.request(O,{id:t,input:e})).updateApplication},async delete(t){return (await i.request(y,{id:t})).deleteApplication},versions:{async list(t){return (await i.request(E,{applicationId:t})).applicationVersions},async create(t,e){return (await i.request(T,{applicationId:t,input:e})).createApplicationVersion}},listing:{async submit(t,e){return (await i.request(v,{id:t,notes:e})).submitApplicationForReview},async publish(t){return (await i.request(C,{id:t})).publishApplication}},logs:{async list(t,e){return (await i.request(f,{applicationId:t,limit:e?.limit,offset:e?.offset})).applicationLogs}},analytics:{async get(t,e,o){return (await i.request(h,{applicationId:t,period:e,startDate:o?.startDate,endDate:o?.endDate})).applicationAnalytics}},webhooks:{async list(t){return (await i.request(r,{applicationId:t})).webhooks},async create(t){return (await i.request(s,{input:t})).createWebhook},async delete(t){return (await i.request(c,{id:t})).deleteWebhook}}}}function j(a){let{global:i}=a.gql;return {async list(t){return (await i.request(L,{applicationId:t?.applicationId,workspaceId:t?.workspaceId})).delegations},async create(t){return (await i.request(_,{input:t})).createDelegation},async revoke(t){return (await i.request(R,{id:t})).revokeDelegation}}}function U(a){let{global:i}=a.gql;return {async list(t){return (await i.request(P,{applicationId:t})).oauthClients},async create(t){return (await i.request(b,{input:t})).createOAuthClient},async delete(t){return (await i.request($,{id:t})).deleteOAuthClient}}}function G(a){let{global:i}=a.gql;return {async list(t){return (await i.request(l,{limit:t?.limit,offset:t?.offset})).organizations},async get(t){return (await i.request(A,{id:t})).organization},async create(t){return (await i.request(d,{input:t})).createOrganization},async update(t,e){return (await i.request(u,{id:t,input:e})).updateOrganization},async delete(t){return (await i.request(I,{id:t})).deleteOrganization}}}function H(a){let{global:i}=a.gql;return {async organization(t,e){return (await i.request(w,{organizationId:t,period:e})).organizationRevenue}}}function B(a){let{global:i}=a.gql;return {async list(t){return (await i.request(r,{applicationId:t})).webhooks},async create(t){return (await i.request(s,{input:t})).createWebhook},async delete(t){return (await i.request(c,{id:t})).deleteWebhook}}}var Z={id:"devportal",version:"1.0.0",displayName:"Devportal",dependsOn:["auth"],attach(a){return {orgs:G(a),apps:V(a),oauth:U(a),apiKeys:K(a),delegations:j(a),webhooks:B(a),revenue:H(a),admin:z(a)}}},kt=Z;export{kt as default};
231
+ `;function K(a){let{global:i}=a.gql;return {reviews:{async list(t){return (await i.request(W,{status:t?.status})).adminReviews},async approve(t,e){return (await i.request(q,{id:t,notes:e})).approveApplication},async reject(t,e){return (await i.request(z,{id:t,notes:e})).rejectApplication}}}}function V(a){let{global:i}=a.gql;return {async list(t){return (await i.request(S,{applicationId:t})).apiKeys},async create(t){return (await i.request(x,{input:t})).createApiKey},async revoke(t){return (await i.request(R,{id:t})).revokeApiKey}}}function j(a){let{global:i}=a.gql;return {async list(t){return (await i.request(g,{organizationId:t?.organizationId,status:t?.status,limit:t?.limit,offset:t?.offset})).applications},async get(t){return (await i.request(v,{id:t})).application},async create(t){return (await i.request(D,{input:t})).createApplication},async update(t,e){return (await i.request(O,{id:t,input:e})).updateApplication},async delete(t){return {success:(await i.request(E,{id:t})).deleteApplication}},versions:{async list(t){return (await i.request(T,{applicationId:t})).application?.versions.edges.map(o=>o.node)??[]},async create(t,e){return (await i.request(P,{applicationId:t,input:e})).createApplicationVersion}},listing:{async submit(t,e){return (await i.request(C,{id:t,notes:e})).submitApplicationForReview},async publish(t){return (await i.request(y,{id:t})).publishApplication}},logs:{async list(t,e){return (await i.request(f,{applicationId:t,limit:e?.limit,offset:e?.offset})).applicationLogs}},analytics:{async get(t,e,o){return (await i.request(h,{applicationId:t,period:e,startDate:o?.startDate,endDate:o?.endDate})).applicationAnalytics}},webhooks:{async list(t){return (await i.request(s,{applicationId:t})).webhooks},async create(t){let{applicationId:e,...o}=t;return (await i.request(l,{applicationId:e,input:o})).createWebhook},async delete(t){return {success:(await i.request(c,{id:t})).deleteWebhook}}}}}function U(a){let{global:i}=a.gql;return {async list(t){return (await i.request(L,{applicationId:t?.applicationId,workspaceId:t?.workspaceId})).delegations},async create(t){return (await i.request(_,{input:t})).createDelegation},async revoke(t){return (await i.request(w,{id:t})).revokeDelegation}}}function G(a){let{global:i}=a.gql;return {async list(t){return (await i.request(b,{applicationId:t})).oauthClients},async create(t){return (await i.request($,{input:t})).createOAuthClient},async delete(t){return (await i.request(k,{id:t})).deleteOAuthClient}}}function H(a){let{global:i}=a.gql;return {async list(t){return (await i.request(A,{limit:t?.limit,offset:t?.offset})).developerOrganizations},async get(t){return (await i.request(d,{id:t})).developerOrganization},async create(t){return (await i.request(u,{input:t})).createDeveloperOrganization},async update(t,e){return (await i.request(I,{id:t,input:e})).updateDeveloperOrganization},async delete(t){return {success:(await i.request(m,{id:t})).deleteDeveloperOrganization}}}}function B(a){let{global:i}=a.gql;return {async organization(t,e){let r=(await i.request(N,{organizationId:t,period:e})).developerOrgRevenueSummary;return {totalEarnings:r.totalGrossRevenue,netEarnings:r.totalNetRevenue,currency:null}}}}function Z(a){let{global:i}=a.gql;return {async list(t){return (await i.request(s,{applicationId:t})).webhooks},async create(t){let{applicationId:e,...o}=t;return (await i.request(l,{applicationId:e,input:o})).createWebhook},async delete(t){return {success:(await i.request(c,{id:t})).deleteWebhook}}}}var Y={id:"devportal",version:"1.0.0",displayName:"Devportal",dependsOn:["auth"],attach(a){return {orgs:H(a),apps:j(a),oauth:G(a),apiKeys:V(a),delegations:U(a),webhooks:Z(a),revenue:B(a),admin:K(a)}}},kt=Y;export{kt 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 activeInstallCount
4
- publisher { name }
3
+ id name slug description price currency type status downloads
4
+ publisher { id name isVerified }
5
5
  }
6
- `,i=`
6
+ `,a=`
7
7
  fragment CartFields on Cart {
8
8
  id currency subtotal total itemCount isEmpty
9
- items { id productId quantity metadata }
10
- }
11
- `,d=`
12
- fragment OrderFields on Order {
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
- ${n}
18
- query SearchStore($query: String!, $filters: StoreFiltersInput) {
19
- searchStore(query: $query, filters: $filters) { ...StoreProductFields }
15
+ fragment OrderFields on StoreOrder {
16
+ id status total currency purchasedAt billingAccountId createdAt
17
+ lineItems
20
18
  }
21
19
  `,l=`
22
- ${i}
23
- query MyCart {
24
- myCart { ...CartFields }
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
- ${i}
28
- mutation AddToCart($input: AddToCartInput!) {
29
- addToCart(input: $input) { ...CartFields }
25
+ ${a}
26
+ query MyCart {
27
+ myCart { ...CartFields }
30
28
  }
31
29
  `,p=`
32
- ${i}
33
- mutation RemoveFromCart($cartId: ID!, $itemId: ID!) {
34
- removeFromCart(cartId: $cartId, itemId: $itemId) { ...CartFields }
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
- ${i}
38
- mutation ClearCart($cartId: ID!) {
39
- clearCart(cartId: $cartId) { ...CartFields }
40
- }
41
- `,I=`
42
- ${d}
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
- query GetInstalledProducts($workspaceId: ID!) {
53
- getInstalledProducts(workspaceId: $workspaceId) {
54
- id status installedAt lastUsedAt
55
- application { id name }
46
+ ${a}
47
+ mutation ClearCart {
48
+ clearCart {
49
+ cart { ...CartFields }
50
+ errors { code field message }
56
51
  }
57
52
  }
58
53
  `,S=`
59
- mutation UninstallProduct($installationId: ID!) {
60
- uninstallProduct(installationId: $installationId) { success }
54
+ ${c}
55
+ query MyOrders($limit: Int, $offset: Int, $status: OrderStatus) {
56
+ myOrders(limit: $limit, offset: $offset, status: $status) { ...OrderFields }
61
57
  }
62
- `,P=`
63
- query GetLicenses($entitlementId: ID!) {
64
- getLicenses(entitlementId: $entitlementId) {
65
- id status validFrom expiresAt
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
- `,f=`
69
- query GetPublisher($id: ID!) {
70
- getPublisher(id: $id) {
71
- id name description websiteUrl contactEmail isVerified createdAt
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
- ${n}
76
- query GetPublisherProducts($publisherId: ID!, $limit: Int, $offset: Int) {
77
- getPublisherProducts(publisherId: $publisherId, limit: $limit, offset: $offset) {
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 g(e){let{global:r}=e.gql;return {async get(){return (await r.request(l)).myCart},async add(t){return (await r.request(u,{input:t})).addToCart},async remove(t,s){return (await r.request(p,{cartId:t,itemId:s})).removeFromCart},async clear(t){return (await r.request(m,{cartId:t})).clearCart}}}function T(e){let{global:r}=e.gql;return {async list(t){return (await r.request(A,{workspaceId:t})).getInstalledProducts},async uninstall(t){return (await r.request(S,{installationId:t})).uninstallProduct}}}function R(e){let{global:r}=e.gql;return {async list(t){return (await r.request(P,{entitlementId:t})).getLicenses}}}function h(e){let{global:r}=e.gql;return {async list(t){return (await r.request(I,{limit:t?.limit,offset:t?.offset})).getOrders},async get(t){return (await r.request(C,{id:t})).getOrder}}}function O(e){let{global:r}=e.gql;return {async get(t){return (await r.request(f,{id:t})).getPublisher},async products(t,s){return (await r.request(y,{publisherId:t,limit:s?.limit,offset:s?.offset})).getPublisherProducts}}}function b(e){let{global:r}=e.gql;return {async search(t,s){return (await r.request(c,{query:t,filters:s})).searchStore}}}var x={id:"store",version:"1.0.0",displayName:"Store",dependsOn:["auth"],attach(e){return {search:b(e),cart:g(e),orders:h(e),installed:T(e),licenses:R(e),publisher:O(e)}}},tt=x;module.exports=tt;
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
- activeInstallCount?: number | null;
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 StoreFiltersInput {
19
- type?: StoreProductType;
20
- category?: string;
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
- metadata?: Json;
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?: string | null;
35
- subtotal?: number | null;
36
- total?: number | null;
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
- metadata?: Json;
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?: number | null;
51
- currency?: string | null;
52
- paidAt?: string | null;
53
- billingAccountId?: string | null;
63
+ total: number;
64
+ currency: string;
65
+ purchasedAt?: string | null;
66
+ billingAccountId: string;
54
67
  createdAt: string;
55
- lineItems?: Array<{
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
- application: {
64
- id: string;
65
- name: string;
66
- };
72
+ productId: string;
73
+ workspaceId: string;
74
+ workspaceName?: string | null;
67
75
  status: string;
68
76
  installedAt: string;
69
- lastUsedAt?: string | null;
77
+ updatedAt: string;
78
+ uninstalledAt?: string | null;
79
+ version?: string | null;
70
80
  }
71
- interface License {
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
- validFrom?: string | null;
75
- expiresAt?: string | null;
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
- description?: string | null;
81
- websiteUrl?: string | null;
115
+ legalName?: string | null;
116
+ email: string;
82
117
  contactEmail?: string | null;
83
- isVerified?: boolean | null;
84
- createdAt?: string | null;
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(cartId: string, itemId: string): Promise<Cart>;
95
- clear(cartId: string): Promise<Cart>;
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(workspaceId: string): Promise<InstalledProduct[]>;
100
- uninstall(installationId: string): Promise<{
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
- get(id: string): Promise<Publisher | null>;
119
- products(publisherId: string, opts?: {
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, filters?: StoreFiltersInput): Promise<StoreProduct[]>;
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 SearchApi, type StoreApi, type StoreFiltersInput, type StoreProduct, type StoreProductType, storeModule as default };
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 };