@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,129 +1,176 @@
1
1
  import { J as Json, S as SdkModule } from '../../module-JDbvil5h.js';
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 };
@@ -1,82 +1,104 @@
1
- var d=`
1
+ import {b as b$1}from'../../chunk-NEREAHJ6.js';var l=`
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
6
  `,a=`
7
7
  fragment CartFields on Cart {
8
8
  id currency subtotal total itemCount isEmpty
9
- items { id productId quantity metadata }
9
+ items {
10
+ id productId quantity unitPrice subtotal
11
+ productName variantId workspaceId
12
+ }
10
13
  }
11
14
  `,c=`
12
- fragment OrderFields on Order {
13
- id status total currency paidAt billingAccountId createdAt
14
- lineItems { productId quantity unitPrice }
15
- }
16
- `,l=`
17
- ${d}
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
  `,u=`
20
+ ${l}
21
+ query SearchStore($query: String!, $limit: Int, $offset: Int) {
22
+ searchProducts(query: $query, limit: $limit, offset: $offset) { ...StoreProductFields }
23
+ }
24
+ `,p=`
22
25
  ${a}
23
26
  query MyCart {
24
27
  myCart { ...CartFields }
25
28
  }
26
- `,p=`
29
+ `,m=`
27
30
  ${a}
28
31
  mutation AddToCart($input: AddToCartInput!) {
29
- addToCart(input: $input) { ...CartFields }
32
+ addToCart(input: $input) {
33
+ cart { ...CartFields }
34
+ errors { code field message }
35
+ }
30
36
  }
31
- `,m=`
37
+ `,S=`
32
38
  ${a}
33
- mutation RemoveFromCart($cartId: ID!, $itemId: ID!) {
34
- removeFromCart(cartId: $cartId, itemId: $itemId) { ...CartFields }
39
+ mutation RemoveFromCart($cartItemId: String!) {
40
+ removeFromCart(cartItemId: $cartItemId) {
41
+ cart { ...CartFields }
42
+ errors { code field message }
43
+ }
35
44
  }
36
- `,I=`
45
+ `,f=`
37
46
  ${a}
38
- mutation ClearCart($cartId: ID!) {
39
- clearCart(cartId: $cartId) { ...CartFields }
47
+ mutation ClearCart {
48
+ clearCart {
49
+ cart { ...CartFields }
50
+ errors { code field message }
51
+ }
40
52
  }
41
- `,C=`
53
+ `,A=`
42
54
  ${c}
43
- query GetOrders($limit: Int, $offset: Int) {
44
- getOrders(limit: $limit, offset: $offset) { ...OrderFields }
55
+ query MyOrders($limit: Int, $offset: Int, $status: OrderStatus) {
56
+ myOrders(limit: $limit, offset: $offset, status: $status) { ...OrderFields }
45
57
  }
46
- `,A=`
58
+ `,C=`
47
59
  ${c}
48
- query GetOrder($id: ID!) {
49
- getOrder(id: $id) { ...OrderFields }
60
+ query GetStoreOrder($id: ID!) {
61
+ getStoreOrder(id: $id) { ...OrderFields }
50
62
  }
51
- `,S=`
52
- query GetInstalledProducts($workspaceId: ID!) {
53
- getInstalledProducts(workspaceId: $workspaceId) {
54
- id status installedAt lastUsedAt
55
- application { id name }
63
+ `,y=`
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
56
72
  }
57
73
  }
58
- `,P=`
59
- mutation UninstallProduct($installationId: ID!) {
60
- uninstallProduct(installationId: $installationId) { success }
74
+ `,I=`
75
+ mutation RecordAppUninstallation($productId: String!, $workspaceId: String!) {
76
+ recordAppUninstallation(productId: $productId, workspaceId: $workspaceId) {
77
+ id productId workspaceId status uninstalledAt updatedAt
78
+ }
61
79
  }
62
- `,f=`
63
- query GetLicenses($entitlementId: ID!) {
64
- getLicenses(entitlementId: $entitlementId) {
65
- id status validFrom expiresAt
80
+ `,P=`
81
+ query EntitlementSeats($entitlementId: ID!) {
82
+ entitlementSeats(entitlementId: $entitlementId) {
83
+ id entitlementId assigneeUserId assigneeEmail role
84
+ assignedAt revokedAt revocationReason
66
85
  }
67
86
  }
68
- `,y=`
69
- query GetPublisher($id: ID!) {
70
- getPublisher(id: $id) {
71
- id name description websiteUrl contactEmail isVerified createdAt
87
+ `,O=`
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
72
94
  }
73
95
  }
74
- `,g=`
75
- ${d}
76
- query GetPublisherProducts($publisherId: ID!, $limit: Int, $offset: Int) {
77
- getPublisherProducts(publisherId: $publisherId, limit: $limit, offset: $offset) {
96
+ `,R=`
97
+ ${l}
98
+ query MyPublisherProducts {
99
+ myPublisher {
100
+ id productCount
78
101
  products { ...StoreProductFields }
79
- totalCount
80
102
  }
81
103
  }
82
- `;function T(e){let{global:r}=e.gql;return {async get(){return (await r.request(u)).myCart},async add(t){return (await r.request(p,{input:t})).addToCart},async remove(t,s){return (await r.request(m,{cartId:t,itemId:s})).removeFromCart},async clear(t){return (await r.request(I,{cartId:t})).clearCart}}}function R(e){let{global:r}=e.gql;return {async list(t){return (await r.request(S,{workspaceId:t})).getInstalledProducts},async uninstall(t){return (await r.request(P,{installationId:t})).uninstallProduct}}}function h(e){let{global:r}=e.gql;return {async list(t){return (await r.request(f,{entitlementId:t})).getLicenses}}}function O(e){let{global:r}=e.gql;return {async list(t){return (await r.request(C,{limit:t?.limit,offset:t?.offset})).getOrders},async get(t){return (await r.request(A,{id:t})).getOrder}}}function b(e){let{global:r}=e.gql;return {async get(t){return (await r.request(y,{id:t})).getPublisher},async products(t,s){return (await r.request(g,{publisherId:t,limit:s?.limit,offset:s?.offset})).getPublisherProducts}}}function x(e){let{global:r}=e.gql;return {async search(t,s){return (await r.request(l,{query:t,filters:s})).searchStore}}}var $={id:"store",version:"1.0.0",displayName:"Store",dependsOn:["auth"],attach(e){return {search:x(e),cart:T(e),orders:O(e),installed:R(e),licenses:h(e),publisher:b(e)}}},et=$;export{et as default};
104
+ `;function d(e,r){if(e.errors&&e.errors.length>0){let t=e.errors[0];throw new b$1(`store.cart.${r}: ${t.code} ${t.message}`,t.code,{field:t.field,errors:e.errors})}if(!e.cart)throw new b$1(`store.cart.${r}: server returned empty cart`,"EMPTY_CART_PAYLOAD");return e.cart}function h(e){let{global:r}=e.gql;return {async get(){return (await r.request(p)).myCart},async add(t){let o=await r.request(m,{input:t});return d(o.addToCart,"add")},async remove(t){let o=await r.request(S,{cartItemId:t});return d(o.removeFromCart,"remove")},async clear(){let t=await r.request(f);return d(t.clearCart,"clear")}}}function T(e){let{global:r}=e.gql;return {async list(t){return (await r.request(y,{filter:t?.filter,limit:t?.limit,offset:t?.offset})).myStoreAppInstallations},async uninstall(t,o){return (await r.request(I,{productId:t,workspaceId:o})).recordAppUninstallation}}}function g(e){let{global:r}=e.gql;return {async list(t){return (await r.request(P,{entitlementId:t})).entitlementSeats}}}function x(e){let{global:r}=e.gql;return {async list(t){return (await r.request(A,{limit:t?.limit,offset:t?.offset,status:t?.status})).myOrders},async get(t){return (await r.request(C,{id:t})).getStoreOrder}}}function b(e){let{global:r}=e.gql;return {async me(){return (await r.request(O)).myPublisher},async myProducts(){let o=(await r.request(R)).myPublisher;return o?{publisherId:o.id,productCount:o.productCount,products:o.products}:null}}}function _(e){let{global:r}=e.gql;return {async search(t,o){return (await r.request(u,{query:t,limit:o?.limit,offset:o?.offset})).searchProducts}}}var $={id:"store",version:"1.0.0",displayName:"Store",dependsOn:["auth"],attach(e){return {search:_(e),cart:h(e),orders:x(e),installed:T(e),licenses:g(e),publisher:b(e)}}},st=$;export{st as default};
@@ -1,19 +1,22 @@
1
1
  'use strict';var o=`
2
2
  fragment WorkspaceFields on Workspace {
3
- id name slug description tenantId organizationId status createdAt updatedAt
3
+ id name type status tenantId orgId ownerId
4
+ domain contactEmail website address
5
+ createdAt updatedAt createdBy deletedAt
4
6
  }
5
7
  `,p=`
6
8
  fragment WorkspaceMemberFields on WorkspaceMember {
7
- id userId email role status joinedAt
9
+ id userId workspaceId role status createdAt updatedAt
8
10
  }
9
11
  `,c=`
10
12
  fragment ProjectFields on Project {
11
- id name description workspaceId status createdAt updatedAt
13
+ id name key workspaceId status archived
14
+ createdAt updatedAt creatorId deletedAt
12
15
  }
13
16
  `,n=`
14
17
  ${o}
15
- query Workspaces($limit: Int, $offset: Int) {
16
- workspaces(limit: $limit, offset: $offset) {
18
+ query Workspaces($filter: WorkspaceFilterInput, $pagination: PaginationInput) {
19
+ workspaces(filter: $filter, pagination: $pagination) {
17
20
  items { ...WorkspaceFields }
18
21
  total
19
22
  hasMore
@@ -45,19 +48,19 @@
45
48
  hasMore
46
49
  }
47
50
  }
48
- `,P=`
51
+ `,I=`
49
52
  ${p}
50
53
  mutation AddWorkspaceMember($input: AddWorkspaceMemberInput!) {
51
54
  addWorkspaceMember(input: $input) { ...WorkspaceMemberFields }
52
55
  }
53
- `,l=`
56
+ `,P=`
54
57
  mutation RemoveWorkspaceMember($id: ID!) { removeWorkspaceMember(id: $id) }
55
- `,I=`
58
+ `,l=`
56
59
  ${p}
57
60
  mutation UpdateWorkspaceMemberRoles($input: UpdateWorkspaceMemberRolesInput!) {
58
61
  updateWorkspaceMemberRoles(input: $input) { ...WorkspaceMemberFields }
59
62
  }
60
- `,E=`
63
+ `,A=`
61
64
  ${c}
62
65
  query Projects($filter: ProjectFilterInput, $pagination: PaginationInput) {
63
66
  projects(filter: $filter, pagination: $pagination) {
@@ -66,7 +69,7 @@
66
69
  hasMore
67
70
  }
68
71
  }
69
- `,A=`
72
+ `,E=`
70
73
  ${c}
71
74
  query Project($id: ID!) {
72
75
  project(id: $id) { ...ProjectFields }
@@ -77,15 +80,16 @@
77
80
  createProject(input: $input) { ...ProjectFields }
78
81
  }
79
82
  `,R=`
80
- query WorkspaceActivity($workspaceId: ID!, $limit: Int, $offset: Int) {
81
- getWorkspaceActivities(workspaceId: $workspaceId, limit: $limit, offset: $offset) {
82
- id action actorId summary createdAt
83
+ query WorkspaceActivity($workspaceId: ID!) {
84
+ workspaceActivity(workspaceId: $workspaceId) {
85
+ id action actorId resourceType resourceId
86
+ workspaceId metadata createdAt
83
87
  }
84
88
  }
85
89
  `,b=`
86
90
  mutation AcceptInvitation($id: ID!) {
87
91
  acceptInvitation(id: $id) {
88
- id status workspaceId
92
+ id status workspaceId email expiresAt
89
93
  }
90
94
  }
91
- `;function C(s){let{workspace:r}=s.gql;return {async list(e){return (await r.request(n,{limit:e?.limit,offset:e?.offset})).workspaces},async get(e){return (await r.request(d,{id:e})).workspace},async create(e){return (await r.request(k,{input:e})).createWorkspace},async update(e,t){return (await r.request(W,{id:e,input:t})).updateWorkspace},async delete(e){return (await r.request(u,{id:e})).deleteWorkspace},members:{async list(e,t){return (await r.request(m,{workspaceId:e,pagination:t})).workspaceMembers},async add(e){return (await r.request(P,{input:e})).addWorkspaceMember},async remove(e){return (await r.request(l,{id:e})).removeWorkspaceMember},async role(e,t){let a={id:e,role:t};return (await r.request(I,{input:a})).updateWorkspaceMemberRoles}},projects:{async list(e,t){return (await r.request(E,{filter:e,pagination:t})).projects},async get(e){return (await r.request(A,{id:e})).project},async create(e){return (await r.request(M,{input:e})).createProject}},async activity(e,t){return (await r.request(R,{workspaceId:e,limit:t?.limit,offset:t?.offset})).getWorkspaceActivities},invites:{async accept(e){return (await r.request(b,{id:e})).acceptInvitation}}}}var $={id:"workspaces",version:"1.0.0",displayName:"Workspaces",dependsOn:["auth"],attach(s){return C(s)}},g=$;module.exports=g;
95
+ `;function C(s){let{workspace:r}=s.gql;return {async list(e){return (await r.request(n,{filter:e?.filter,pagination:e?.pagination})).workspaces},async get(e){return (await r.request(d,{id:e})).workspace},async create(e){return (await r.request(k,{input:e})).createWorkspace},async update(e,t){return (await r.request(W,{id:e,input:t})).updateWorkspace},async delete(e){return (await r.request(u,{id:e})).deleteWorkspace},members:{async list(e,t){return (await r.request(m,{workspaceId:e,pagination:t})).workspaceMembers},async add(e){return (await r.request(I,{input:e})).addWorkspaceMember},async remove(e){return (await r.request(P,{id:e})).removeWorkspaceMember},async role(e,t){let a={id:e,role:t};return (await r.request(l,{input:a})).updateWorkspaceMemberRoles}},projects:{async list(e,t){return (await r.request(A,{filter:e,pagination:t})).projects},async get(e){return (await r.request(E,{id:e})).project},async create(e){return (await r.request(M,{input:e})).createProject}},async activity(e){let t=await r.request(R,{workspaceId:e});return t.workspaceActivity?[t.workspaceActivity]:[]},invites:{async accept(e){return (await r.request(b,{id:e})).acceptInvitation}}}}var j={id:"workspaces",version:"1.0.0",displayName:"Workspaces",dependsOn:["auth"],attach(s){return C(s)}},O=j;module.exports=O;
@@ -2,43 +2,61 @@ import { J as Json, P as PaginationInput, S as SdkModule } from '../../module-JD
2
2
  import 'graphql-request';
3
3
 
4
4
  type WorkspaceStatus = 'ACTIVE' | 'ARCHIVED' | 'DELETED' | 'SUSPENDED';
5
+ type WorkspaceType = 'PERSONAL' | 'TEAM' | 'ORGANIZATION';
5
6
  interface Workspace {
6
7
  id: string;
7
8
  name: string;
8
- slug: string;
9
- description?: string | null;
10
- tenantId: string;
11
- organizationId?: string | null;
9
+ type: WorkspaceType;
12
10
  status: WorkspaceStatus;
11
+ tenantId: string;
12
+ orgId?: string | null;
13
+ ownerId: string;
14
+ domain?: string | null;
15
+ contactEmail?: string | null;
16
+ website?: string | null;
17
+ address?: string | null;
13
18
  createdAt: string;
14
19
  updatedAt: string;
20
+ createdBy?: string | null;
21
+ deletedAt?: string | null;
15
22
  }
16
23
  interface WorkspaceList {
17
24
  items: Workspace[];
18
25
  total: number;
19
26
  hasMore: boolean;
20
27
  }
28
+ interface WorkspaceFilterInput {
29
+ status?: WorkspaceStatus;
30
+ type?: WorkspaceType;
31
+ ownerId?: string;
32
+ search?: string;
33
+ }
21
34
  interface CreateWorkspaceInput {
22
35
  name: string;
23
- slug?: string;
24
- description?: string;
25
- organizationId?: string;
26
- metadata?: Json;
36
+ type?: WorkspaceType;
37
+ orgId?: string;
38
+ domain?: string;
39
+ contactEmail?: string;
40
+ website?: string;
41
+ address?: string;
27
42
  }
28
43
  interface UpdateWorkspaceInput {
29
44
  name?: string;
30
- description?: string;
31
45
  status?: WorkspaceStatus;
32
- metadata?: Json;
46
+ domain?: string;
47
+ contactEmail?: string;
48
+ website?: string;
49
+ address?: string;
33
50
  }
34
51
  type WorkspaceMemberRole = 'OWNER' | 'ADMIN' | 'MEMBER' | 'VIEWER';
35
52
  interface WorkspaceMember {
36
53
  id: string;
37
54
  userId: string;
38
- email?: string | null;
39
- role: WorkspaceMemberRole;
40
- status?: string | null;
41
- joinedAt?: string | null;
55
+ workspaceId: string;
56
+ role: string;
57
+ status: string;
58
+ createdAt: string;
59
+ updatedAt: string;
42
60
  }
43
61
  interface WorkspaceMemberList {
44
62
  items: WorkspaceMember[];
@@ -57,11 +75,14 @@ interface UpdateWorkspaceMemberRolesInput {
57
75
  interface Project {
58
76
  id: string;
59
77
  name: string;
60
- description?: string | null;
78
+ key: string;
61
79
  workspaceId: string;
62
80
  status: string;
81
+ archived: boolean;
82
+ creatorId: string;
63
83
  createdAt: string;
64
- updatedAt?: string | null;
84
+ updatedAt: string;
85
+ deletedAt?: string | null;
65
86
  }
66
87
  interface ProjectList {
67
88
  items: Project[];
@@ -71,24 +92,31 @@ interface ProjectList {
71
92
  interface CreateProjectInput {
72
93
  workspaceId: string;
73
94
  name: string;
74
- description?: string;
95
+ key: string;
96
+ config?: Json;
75
97
  }
76
98
  interface ProjectFilterInput {
77
99
  workspaceId?: string;
78
100
  status?: string;
79
101
  search?: string;
102
+ archived?: boolean;
80
103
  }
81
104
  interface WorkspaceActivity {
82
105
  id: string;
83
106
  action: string;
84
- actorId?: string | null;
85
- summary?: string | null;
107
+ actorId: string;
108
+ workspaceId: string;
109
+ resourceType?: string | null;
110
+ resourceId?: string | null;
111
+ metadata?: Json;
86
112
  createdAt: string;
87
113
  }
88
114
  interface WorkspaceInvite {
89
115
  id: string;
90
116
  status: string;
91
- workspaceId: string;
117
+ workspaceId?: string | null;
118
+ email?: string | null;
119
+ expiresAt?: string | null;
92
120
  }
93
121
 
94
122
  interface WorkspaceMembersApi {
@@ -105,21 +133,19 @@ interface WorkspaceProjectsApi {
105
133
  interface WorkspaceInvitesApi {
106
134
  accept(id: string): Promise<WorkspaceInvite>;
107
135
  }
136
+ interface WorkspacesListOptions {
137
+ filter?: WorkspaceFilterInput;
138
+ pagination?: PaginationInput;
139
+ }
108
140
  interface WorkspacesApi {
109
- list(opts?: {
110
- limit?: number;
111
- offset?: number;
112
- }): Promise<WorkspaceList>;
141
+ list(opts?: WorkspacesListOptions): Promise<WorkspaceList>;
113
142
  get(id: string): Promise<Workspace | null>;
114
143
  create(input: CreateWorkspaceInput): Promise<Workspace>;
115
144
  update(id: string, input: UpdateWorkspaceInput): Promise<Workspace>;
116
145
  delete(id: string): Promise<boolean>;
117
146
  members: WorkspaceMembersApi;
118
147
  projects: WorkspaceProjectsApi;
119
- activity(workspaceId: string, opts?: {
120
- limit?: number;
121
- offset?: number;
122
- }): Promise<WorkspaceActivity[]>;
148
+ activity(workspaceId: string): Promise<WorkspaceActivity[]>;
123
149
  invites: WorkspaceInvitesApi;
124
150
  }
125
151