@burdenoff/sdk-libs 2026.501.6

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.
Files changed (103) hide show
  1. package/LICENSE +4 -0
  2. package/README.md +52 -0
  3. package/dist/chunk-NEREAHJ6.js +1 -0
  4. package/dist/chunk-YGVAZ3D7.js +2 -0
  5. package/dist/core/index.cjs +2 -0
  6. package/dist/core/index.d.cts +52 -0
  7. package/dist/core/index.d.ts +52 -0
  8. package/dist/core/index.js +1 -0
  9. package/dist/index.cjs +2 -0
  10. package/dist/index.d.cts +3 -0
  11. package/dist/index.d.ts +3 -0
  12. package/dist/index.js +1 -0
  13. package/dist/module-JDbvil5h.d.cts +194 -0
  14. package/dist/module-JDbvil5h.d.ts +194 -0
  15. package/dist/modules/auth/index.cjs +71 -0
  16. package/dist/modules/auth/index.d.cts +94 -0
  17. package/dist/modules/auth/index.d.ts +94 -0
  18. package/dist/modules/auth/index.js +71 -0
  19. package/dist/modules/billing/index.cjs +203 -0
  20. package/dist/modules/billing/index.d.cts +377 -0
  21. package/dist/modules/billing/index.d.ts +377 -0
  22. package/dist/modules/billing/index.js +203 -0
  23. package/dist/modules/channels/index.cjs +108 -0
  24. package/dist/modules/channels/index.d.cts +146 -0
  25. package/dist/modules/channels/index.d.ts +146 -0
  26. package/dist/modules/channels/index.js +108 -0
  27. package/dist/modules/conversations/index.cjs +61 -0
  28. package/dist/modules/conversations/index.d.cts +112 -0
  29. package/dist/modules/conversations/index.d.ts +112 -0
  30. package/dist/modules/conversations/index.js +61 -0
  31. package/dist/modules/devportal/index.cjs +216 -0
  32. package/dist/modules/devportal/index.d.cts +303 -0
  33. package/dist/modules/devportal/index.d.ts +303 -0
  34. package/dist/modules/devportal/index.js +216 -0
  35. package/dist/modules/export/index.cjs +61 -0
  36. package/dist/modules/export/index.d.cts +169 -0
  37. package/dist/modules/export/index.d.ts +169 -0
  38. package/dist/modules/export/index.js +61 -0
  39. package/dist/modules/files/index.cjs +51 -0
  40. package/dist/modules/files/index.d.cts +102 -0
  41. package/dist/modules/files/index.d.ts +102 -0
  42. package/dist/modules/files/index.js +51 -0
  43. package/dist/modules/groups/index.cjs +80 -0
  44. package/dist/modules/groups/index.d.cts +168 -0
  45. package/dist/modules/groups/index.d.ts +168 -0
  46. package/dist/modules/groups/index.js +80 -0
  47. package/dist/modules/health/index.cjs +5 -0
  48. package/dist/modules/health/index.d.cts +18 -0
  49. package/dist/modules/health/index.d.ts +18 -0
  50. package/dist/modules/health/index.js +5 -0
  51. package/dist/modules/integrations/index.cjs +65 -0
  52. package/dist/modules/integrations/index.d.cts +120 -0
  53. package/dist/modules/integrations/index.d.ts +120 -0
  54. package/dist/modules/integrations/index.js +65 -0
  55. package/dist/modules/notifications/index.cjs +53 -0
  56. package/dist/modules/notifications/index.d.cts +140 -0
  57. package/dist/modules/notifications/index.d.ts +140 -0
  58. package/dist/modules/notifications/index.js +53 -0
  59. package/dist/modules/organizations/index.cjs +72 -0
  60. package/dist/modules/organizations/index.d.cts +88 -0
  61. package/dist/modules/organizations/index.d.ts +88 -0
  62. package/dist/modules/organizations/index.js +72 -0
  63. package/dist/modules/products/index.cjs +149 -0
  64. package/dist/modules/products/index.d.cts +361 -0
  65. package/dist/modules/products/index.d.ts +361 -0
  66. package/dist/modules/products/index.js +149 -0
  67. package/dist/modules/rbac/index.cjs +55 -0
  68. package/dist/modules/rbac/index.d.cts +100 -0
  69. package/dist/modules/rbac/index.d.ts +100 -0
  70. package/dist/modules/rbac/index.js +55 -0
  71. package/dist/modules/scheduler/index.cjs +61 -0
  72. package/dist/modules/scheduler/index.d.cts +121 -0
  73. package/dist/modules/scheduler/index.d.ts +121 -0
  74. package/dist/modules/scheduler/index.js +61 -0
  75. package/dist/modules/security/index.cjs +61 -0
  76. package/dist/modules/security/index.d.cts +110 -0
  77. package/dist/modules/security/index.d.ts +110 -0
  78. package/dist/modules/security/index.js +61 -0
  79. package/dist/modules/store/index.cjs +82 -0
  80. package/dist/modules/store/index.d.cts +139 -0
  81. package/dist/modules/store/index.d.ts +139 -0
  82. package/dist/modules/store/index.js +82 -0
  83. package/dist/modules/support/index.cjs +56 -0
  84. package/dist/modules/support/index.d.cts +147 -0
  85. package/dist/modules/support/index.d.ts +147 -0
  86. package/dist/modules/support/index.js +56 -0
  87. package/dist/modules/tags/index.cjs +55 -0
  88. package/dist/modules/tags/index.d.cts +131 -0
  89. package/dist/modules/tags/index.d.ts +131 -0
  90. package/dist/modules/tags/index.js +55 -0
  91. package/dist/modules/tours/index.cjs +37 -0
  92. package/dist/modules/tours/index.d.cts +61 -0
  93. package/dist/modules/tours/index.d.ts +61 -0
  94. package/dist/modules/tours/index.js +37 -0
  95. package/dist/modules/vibecontrols/index.cjs +1081 -0
  96. package/dist/modules/vibecontrols/index.d.cts +1483 -0
  97. package/dist/modules/vibecontrols/index.d.ts +1483 -0
  98. package/dist/modules/vibecontrols/index.js +1081 -0
  99. package/dist/modules/workspaces/index.cjs +91 -0
  100. package/dist/modules/workspaces/index.d.cts +128 -0
  101. package/dist/modules/workspaces/index.d.ts +128 -0
  102. package/dist/modules/workspaces/index.js +91 -0
  103. package/package.json +117 -0
@@ -0,0 +1,169 @@
1
+ import { J as Json, S as SdkModule } from '../../module-JDbvil5h.cjs';
2
+ import 'graphql-request';
3
+
4
+ type ExportJobStatus = 'CANCELLED' | 'COMPLETED' | 'CREATED' | 'DELETED' | 'EXPIRED' | 'FAILED' | 'QUEUED' | 'RUNNING';
5
+ type ExportFormat = 'CSV' | 'JSON';
6
+ type ExportArchiveFormat = 'ZIP';
7
+ type ExportScope = 'INDIVIDUAL' | 'ORG_ADMIN' | 'WORKSPACE_ADMIN';
8
+ type ExportSortField = 'CREATED_AT' | 'NAME' | 'STATUS' | 'TOTAL_SIZE_BYTES' | 'UPDATED_AT';
9
+ type ExportSortDirection = 'ASC' | 'DESC';
10
+ interface ExportContextInput {
11
+ workspaceId?: string;
12
+ userId?: string;
13
+ projectId?: string;
14
+ appId?: string;
15
+ custom?: Json;
16
+ }
17
+ interface ExportPart {
18
+ id: string;
19
+ jobId: string;
20
+ partNumber: number;
21
+ fileName: string;
22
+ fileId?: string | null;
23
+ sizeBytes: string;
24
+ checksum?: string | null;
25
+ entityTypes: string[];
26
+ downloadUrl?: string | null;
27
+ downloadExpiresAt?: string | null;
28
+ context?: Json;
29
+ createdAt: string;
30
+ updatedAt: string;
31
+ }
32
+ interface ExportJob {
33
+ id: string;
34
+ workspaceId: string;
35
+ tenantId?: string | null;
36
+ name: string;
37
+ description?: string | null;
38
+ status: ExportJobStatus;
39
+ format: ExportFormat;
40
+ archiveFormat: ExportArchiveFormat;
41
+ exportScope: ExportScope;
42
+ organizationId?: string | null;
43
+ targetWorkspaceIds: string[];
44
+ entityTypes: string[];
45
+ entityFilters?: Json;
46
+ dateRangeStart?: string | null;
47
+ dateRangeEnd?: string | null;
48
+ includeMedia: boolean;
49
+ includeMetadata: boolean;
50
+ chunkSizeBytes: string;
51
+ templateId?: string | null;
52
+ progress: number;
53
+ totalEntities: number;
54
+ processedEntities: number;
55
+ totalSizeBytes: string;
56
+ errorMessage?: string | null;
57
+ errorCode?: string | null;
58
+ downloadUrl?: string | null;
59
+ downloadExpiresAt?: string | null;
60
+ archiveFileId?: string | null;
61
+ startedAt?: string | null;
62
+ completedAt?: string | null;
63
+ expiresAt?: string | null;
64
+ parts: ExportPart[];
65
+ template?: ExportTemplate | null;
66
+ context?: Json;
67
+ createdBy: string;
68
+ onBehalfOf?: string | null;
69
+ updatedBy?: string | null;
70
+ createdAt: string;
71
+ updatedAt: string;
72
+ }
73
+ interface ExportJobConnection {
74
+ edges: Array<{
75
+ cursor: string;
76
+ node: ExportJob;
77
+ }>;
78
+ pageInfo: {
79
+ hasNextPage: boolean;
80
+ hasPreviousPage: boolean;
81
+ startCursor?: string | null;
82
+ endCursor?: string | null;
83
+ };
84
+ totalCount: number;
85
+ }
86
+ interface ExportTemplate {
87
+ id: string;
88
+ workspaceId: string;
89
+ tenantId?: string | null;
90
+ name: string;
91
+ description?: string | null;
92
+ entityTypes: string[];
93
+ entityFilters?: Json;
94
+ format: ExportFormat;
95
+ includeMedia: boolean;
96
+ includeMetadata: boolean;
97
+ isDefault: boolean;
98
+ context?: Json;
99
+ createdBy: string;
100
+ onBehalfOf?: string | null;
101
+ updatedBy?: string | null;
102
+ createdAt: string;
103
+ updatedAt: string;
104
+ }
105
+ interface ExportTemplateConnection {
106
+ edges: Array<{
107
+ cursor: string;
108
+ node: ExportTemplate;
109
+ }>;
110
+ pageInfo: {
111
+ hasNextPage: boolean;
112
+ hasPreviousPage: boolean;
113
+ startCursor?: string | null;
114
+ endCursor?: string | null;
115
+ };
116
+ totalCount: number;
117
+ }
118
+ interface CreateExportJobInput {
119
+ name: string;
120
+ description?: string;
121
+ exportScope?: ExportScope;
122
+ organizationId?: string;
123
+ entityTypes: string[];
124
+ entityFilters?: Json;
125
+ dateRangeStart?: string;
126
+ dateRangeEnd?: string;
127
+ format?: ExportFormat;
128
+ includeMedia?: boolean;
129
+ includeMetadata?: boolean;
130
+ templateId?: string;
131
+ context?: ExportContextInput;
132
+ }
133
+ interface ExportJobFilterInput {
134
+ status?: ExportJobStatus[];
135
+ format?: ExportFormat;
136
+ entityTypes?: string[];
137
+ dateFrom?: string;
138
+ dateTo?: string;
139
+ search?: string;
140
+ context?: ExportContextInput;
141
+ }
142
+ interface ExportPaginationInput {
143
+ first?: number;
144
+ after?: string;
145
+ last?: number;
146
+ before?: string;
147
+ sortBy?: ExportSortField;
148
+ sortDirection?: ExportSortDirection;
149
+ }
150
+
151
+ interface JobsApi {
152
+ list(context: ExportContextInput, filter?: ExportJobFilterInput, pagination?: ExportPaginationInput): Promise<ExportJobConnection>;
153
+ get(id: string, context?: ExportContextInput): Promise<ExportJob | null>;
154
+ create(input: CreateExportJobInput, context?: ExportContextInput): Promise<ExportJob>;
155
+ }
156
+
157
+ interface TemplatesApi {
158
+ list(context: ExportContextInput, pagination?: ExportPaginationInput): Promise<ExportTemplateConnection>;
159
+ get(id: string, context?: ExportContextInput): Promise<ExportTemplate | null>;
160
+ }
161
+
162
+ interface ExportApi {
163
+ jobs: JobsApi;
164
+ templates: TemplatesApi;
165
+ download(jobId: string, context?: ExportContextInput): Promise<string>;
166
+ }
167
+ declare const exportModule: SdkModule<ExportApi>;
168
+
169
+ export { type CreateExportJobInput, type ExportApi, type ExportArchiveFormat, type ExportContextInput, type ExportFormat, type ExportJob, type ExportJobConnection, type ExportJobFilterInput, type ExportJobStatus, type ExportPaginationInput, type ExportPart, type ExportScope, type ExportSortDirection, type ExportSortField, type ExportTemplate, type ExportTemplateConnection, type JobsApi, type TemplatesApi, exportModule as default };
@@ -0,0 +1,169 @@
1
+ import { J as Json, S as SdkModule } from '../../module-JDbvil5h.js';
2
+ import 'graphql-request';
3
+
4
+ type ExportJobStatus = 'CANCELLED' | 'COMPLETED' | 'CREATED' | 'DELETED' | 'EXPIRED' | 'FAILED' | 'QUEUED' | 'RUNNING';
5
+ type ExportFormat = 'CSV' | 'JSON';
6
+ type ExportArchiveFormat = 'ZIP';
7
+ type ExportScope = 'INDIVIDUAL' | 'ORG_ADMIN' | 'WORKSPACE_ADMIN';
8
+ type ExportSortField = 'CREATED_AT' | 'NAME' | 'STATUS' | 'TOTAL_SIZE_BYTES' | 'UPDATED_AT';
9
+ type ExportSortDirection = 'ASC' | 'DESC';
10
+ interface ExportContextInput {
11
+ workspaceId?: string;
12
+ userId?: string;
13
+ projectId?: string;
14
+ appId?: string;
15
+ custom?: Json;
16
+ }
17
+ interface ExportPart {
18
+ id: string;
19
+ jobId: string;
20
+ partNumber: number;
21
+ fileName: string;
22
+ fileId?: string | null;
23
+ sizeBytes: string;
24
+ checksum?: string | null;
25
+ entityTypes: string[];
26
+ downloadUrl?: string | null;
27
+ downloadExpiresAt?: string | null;
28
+ context?: Json;
29
+ createdAt: string;
30
+ updatedAt: string;
31
+ }
32
+ interface ExportJob {
33
+ id: string;
34
+ workspaceId: string;
35
+ tenantId?: string | null;
36
+ name: string;
37
+ description?: string | null;
38
+ status: ExportJobStatus;
39
+ format: ExportFormat;
40
+ archiveFormat: ExportArchiveFormat;
41
+ exportScope: ExportScope;
42
+ organizationId?: string | null;
43
+ targetWorkspaceIds: string[];
44
+ entityTypes: string[];
45
+ entityFilters?: Json;
46
+ dateRangeStart?: string | null;
47
+ dateRangeEnd?: string | null;
48
+ includeMedia: boolean;
49
+ includeMetadata: boolean;
50
+ chunkSizeBytes: string;
51
+ templateId?: string | null;
52
+ progress: number;
53
+ totalEntities: number;
54
+ processedEntities: number;
55
+ totalSizeBytes: string;
56
+ errorMessage?: string | null;
57
+ errorCode?: string | null;
58
+ downloadUrl?: string | null;
59
+ downloadExpiresAt?: string | null;
60
+ archiveFileId?: string | null;
61
+ startedAt?: string | null;
62
+ completedAt?: string | null;
63
+ expiresAt?: string | null;
64
+ parts: ExportPart[];
65
+ template?: ExportTemplate | null;
66
+ context?: Json;
67
+ createdBy: string;
68
+ onBehalfOf?: string | null;
69
+ updatedBy?: string | null;
70
+ createdAt: string;
71
+ updatedAt: string;
72
+ }
73
+ interface ExportJobConnection {
74
+ edges: Array<{
75
+ cursor: string;
76
+ node: ExportJob;
77
+ }>;
78
+ pageInfo: {
79
+ hasNextPage: boolean;
80
+ hasPreviousPage: boolean;
81
+ startCursor?: string | null;
82
+ endCursor?: string | null;
83
+ };
84
+ totalCount: number;
85
+ }
86
+ interface ExportTemplate {
87
+ id: string;
88
+ workspaceId: string;
89
+ tenantId?: string | null;
90
+ name: string;
91
+ description?: string | null;
92
+ entityTypes: string[];
93
+ entityFilters?: Json;
94
+ format: ExportFormat;
95
+ includeMedia: boolean;
96
+ includeMetadata: boolean;
97
+ isDefault: boolean;
98
+ context?: Json;
99
+ createdBy: string;
100
+ onBehalfOf?: string | null;
101
+ updatedBy?: string | null;
102
+ createdAt: string;
103
+ updatedAt: string;
104
+ }
105
+ interface ExportTemplateConnection {
106
+ edges: Array<{
107
+ cursor: string;
108
+ node: ExportTemplate;
109
+ }>;
110
+ pageInfo: {
111
+ hasNextPage: boolean;
112
+ hasPreviousPage: boolean;
113
+ startCursor?: string | null;
114
+ endCursor?: string | null;
115
+ };
116
+ totalCount: number;
117
+ }
118
+ interface CreateExportJobInput {
119
+ name: string;
120
+ description?: string;
121
+ exportScope?: ExportScope;
122
+ organizationId?: string;
123
+ entityTypes: string[];
124
+ entityFilters?: Json;
125
+ dateRangeStart?: string;
126
+ dateRangeEnd?: string;
127
+ format?: ExportFormat;
128
+ includeMedia?: boolean;
129
+ includeMetadata?: boolean;
130
+ templateId?: string;
131
+ context?: ExportContextInput;
132
+ }
133
+ interface ExportJobFilterInput {
134
+ status?: ExportJobStatus[];
135
+ format?: ExportFormat;
136
+ entityTypes?: string[];
137
+ dateFrom?: string;
138
+ dateTo?: string;
139
+ search?: string;
140
+ context?: ExportContextInput;
141
+ }
142
+ interface ExportPaginationInput {
143
+ first?: number;
144
+ after?: string;
145
+ last?: number;
146
+ before?: string;
147
+ sortBy?: ExportSortField;
148
+ sortDirection?: ExportSortDirection;
149
+ }
150
+
151
+ interface JobsApi {
152
+ list(context: ExportContextInput, filter?: ExportJobFilterInput, pagination?: ExportPaginationInput): Promise<ExportJobConnection>;
153
+ get(id: string, context?: ExportContextInput): Promise<ExportJob | null>;
154
+ create(input: CreateExportJobInput, context?: ExportContextInput): Promise<ExportJob>;
155
+ }
156
+
157
+ interface TemplatesApi {
158
+ list(context: ExportContextInput, pagination?: ExportPaginationInput): Promise<ExportTemplateConnection>;
159
+ get(id: string, context?: ExportContextInput): Promise<ExportTemplate | null>;
160
+ }
161
+
162
+ interface ExportApi {
163
+ jobs: JobsApi;
164
+ templates: TemplatesApi;
165
+ download(jobId: string, context?: ExportContextInput): Promise<string>;
166
+ }
167
+ declare const exportModule: SdkModule<ExportApi>;
168
+
169
+ export { type CreateExportJobInput, type ExportApi, type ExportArchiveFormat, type ExportContextInput, type ExportFormat, type ExportJob, type ExportJobConnection, type ExportJobFilterInput, type ExportJobStatus, type ExportPaginationInput, type ExportPart, type ExportScope, type ExportSortDirection, type ExportSortField, type ExportTemplate, type ExportTemplateConnection, type JobsApi, type TemplatesApi, exportModule as default };
@@ -0,0 +1,61 @@
1
+ import {f}from'../../chunk-NEREAHJ6.js';var b=`
2
+ fragment ExportPartFields on ExportPart {
3
+ id jobId partNumber fileName fileId sizeBytes checksum
4
+ entityTypes downloadUrl downloadExpiresAt context createdAt updatedAt
5
+ }
6
+ `,E=`
7
+ ${b}
8
+ fragment ExportJobFields on ExportJob {
9
+ id workspaceId tenantId name description status format archiveFormat
10
+ exportScope organizationId targetWorkspaceIds entityTypes entityFilters
11
+ dateRangeStart dateRangeEnd includeMedia includeMetadata chunkSizeBytes
12
+ templateId progress totalEntities processedEntities totalSizeBytes
13
+ errorMessage errorCode downloadUrl downloadExpiresAt archiveFileId
14
+ startedAt completedAt expiresAt context createdBy onBehalfOf updatedBy
15
+ createdAt updatedAt
16
+ parts { ...ExportPartFields }
17
+ }
18
+ `,d=`
19
+ fragment ExportTemplateFields on ExportTemplate {
20
+ id workspaceId tenantId name description entityTypes entityFilters
21
+ format includeMedia includeMetadata isDefault context createdBy
22
+ onBehalfOf updatedBy createdAt updatedAt
23
+ }
24
+ `,l=`
25
+ ${E}
26
+ query ListExportJobs(
27
+ $filter: ExportJobFilterInput
28
+ $pagination: ExportPaginationInput
29
+ $context: ContextInput!
30
+ ) {
31
+ listExportJobs(filter: $filter, pagination: $pagination, context: $context) {
32
+ edges { cursor node { ...ExportJobFields } }
33
+ pageInfo { hasNextPage hasPreviousPage startCursor endCursor }
34
+ totalCount
35
+ }
36
+ }
37
+ `,a=`
38
+ ${E}
39
+ query GetExportJob($id: ID!, $context: ContextInput) {
40
+ getExportJob(id: $id, context: $context) { ...ExportJobFields }
41
+ }
42
+ `,c=`
43
+ ${E}
44
+ mutation CreateExportJob($input: CreateExportJobInput!, $context: ContextInput) {
45
+ createExportJob(input: $input, context: $context) { ...ExportJobFields }
46
+ }
47
+ `,u=`
48
+ ${d}
49
+ query ListExportTemplates($pagination: ExportPaginationInput, $context: ContextInput!) {
50
+ listExportTemplates(pagination: $pagination, context: $context) {
51
+ edges { cursor node { ...ExportTemplateFields } }
52
+ pageInfo { hasNextPage hasPreviousPage startCursor endCursor }
53
+ totalCount
54
+ }
55
+ }
56
+ `,m=`
57
+ ${d}
58
+ query GetExportTemplate($id: ID!, $context: ContextInput) {
59
+ getExportTemplate(id: $id, context: $context) { ...ExportTemplateFields }
60
+ }
61
+ `;function T(r){let{workspace:e}=r.gql;return {async list(t,o,p){return (await e.request(l,{filter:o,pagination:p,context:t})).listExportJobs},async get(t,o){return (await e.request(a,{id:t,context:o})).getExportJob},async create(t,o){return (await e.request(c,{input:t,context:o})).createExportJob}}}function J(r){let{workspace:e}=r.gql;return {async list(t,o){return (await e.request(u,{pagination:o,context:t})).listExportTemplates},async get(t,o){return (await e.request(m,{id:t,context:o})).getExportTemplate}}}var g={id:"export",version:"1.0.0",displayName:"Export",dependsOn:["auth"],attach(r){let{workspace:e}=r.gql;return {jobs:T(r),templates:J(r),async download(t,o){let n=(await e.request(a,{id:t,context:o})).getExportJob;if(!n)throw new f(`Export job '${t}' not found`);if(!n.downloadUrl)throw new f(`Export job '${t}' has no download URL (status=${n.status})`);return n.downloadUrl}}}},R=g;export{R as default};
@@ -0,0 +1,51 @@
1
+ 'use strict';var x=["password","secret","clientSecret","apiKey","token","mfaCode","accessToken","refreshToken","workspaceToken","authorization"],A=/\b(eyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+)\b/g;function g(r){let t=r.replace(A,"<redacted-jwt>");for(let o of x){let e=new RegExp(`("${o}"\\s*:\\s*")[^"]*(")`,"gi");t=t.replace(e,"$1<redacted>$2");}return t}var n=class extends Error{code;cause;constructor(t,o="SDK_ERROR",e){super(g(t)),this.name="SdkError",this.code=o,this.cause=e;}};var i=class extends n{constructor(t,o){super(t,"NETWORK_ERROR",o),this.name="NetworkError";}};var d=`
2
+ fragment FileFields on File {
3
+ id name description workspaceId folderId
4
+ mimeType extension size s3Key s3Bucket
5
+ downloadUrl status visibility
6
+ starred downloadCount viewCount sha256Hash
7
+ uploadedById createdAt updatedAt
8
+ tags
9
+ }
10
+ `,l=`
11
+ fragment ShareFields on FileShare {
12
+ id fileId shareType accessLevel
13
+ token invitedEmail invitedUserIds requiresPassword
14
+ expiresAt maxDownloads accessCount downloadCount lastAccessedAt
15
+ revokedAt revokedBy createdById createdAt updatedAt
16
+ }
17
+ `,p=`
18
+ ${d}
19
+ query GetFiles($folderId: ID, $pagination: PaginationInput) {
20
+ getFiles(folderId: $folderId, pagination: $pagination) {
21
+ files { ...FileFields }
22
+ total page limit hasMore
23
+ }
24
+ }
25
+ `,c=`
26
+ ${d}
27
+ query GetFile($id: ID!) { getFile(id: $id) { ...FileFields } }
28
+ `,u=`
29
+ query GetFileDownloadUrl($id: ID!, $expiresIn: Int) {
30
+ getFileDownloadUrl(id: $id, expiresIn: $expiresIn)
31
+ }
32
+ `,F=`
33
+ ${d}
34
+ mutation UploadFile($input: UploadFileInput!) {
35
+ uploadFile(input: $input) {
36
+ file { ...FileFields }
37
+ uploadProgress
38
+ message
39
+ }
40
+ }
41
+ `,E=`
42
+ ${l}
43
+ mutation CreateShare($input: FileCreateShareInput!) {
44
+ createShare(input: $input) { ...ShareFields }
45
+ }
46
+ `,h=`
47
+ ${l}
48
+ mutation RevokeShare($id: ID!) {
49
+ revokeShare(id: $id) { ...ShareFields }
50
+ }
51
+ `;function I(r){let{workspace:t}=r.gql;return {async list(e,s){return (await t.request(p,{folderId:e,pagination:s})).getFiles},async get(e){return (await t.request(c,{id:e})).getFile},async upload(e){if(!e.contentBase64||e.contentBase64.length===0)throw new i("files.upload requires non-empty contentBase64");return (await t.request(F,{input:e})).uploadFile},async download(e,s){return (await t.request(u,{id:e,expiresIn:s})).getFileDownloadUrl},async share(e){return (await t.request(E,{input:e})).createShare},shareApi:{async revoke(e){return (await t.request(h,{id:e})).revokeShare}}}}var R={id:"files",version:"1.0.0",displayName:"Files",dependsOn:["auth"],attach(r){return I(r)}},L=R;module.exports=L;
@@ -0,0 +1,102 @@
1
+ import { J as Json, S as SdkModule } from '../../module-JDbvil5h.cjs';
2
+ import 'graphql-request';
3
+
4
+ type FileStatus = 'UPLOADING' | 'ACTIVE' | 'ARCHIVED' | 'DELETED';
5
+ type FileVisibility = 'PRIVATE' | 'TEAM' | 'WORKSPACE' | 'PUBLIC';
6
+ type FileShareType = 'PUBLIC_LINK' | 'EMAIL_INVITE' | 'GROUP_SHARE';
7
+ type FileShareAccessLevel = 'VIEW' | 'COMMENT' | 'DOWNLOAD' | 'EDIT';
8
+ interface BurdenoffFile {
9
+ id: string;
10
+ name: string;
11
+ description?: string | null;
12
+ workspaceId: string;
13
+ folderId?: string | null;
14
+ mimeType: string;
15
+ extension: string;
16
+ size: string;
17
+ s3Key: string;
18
+ s3Bucket: string;
19
+ downloadUrl?: string | null;
20
+ status: FileStatus;
21
+ visibility: FileVisibility;
22
+ starred: boolean;
23
+ downloadCount: number;
24
+ viewCount: number;
25
+ sha256Hash?: string | null;
26
+ uploadedById: string;
27
+ createdAt: string;
28
+ updatedAt: string;
29
+ tags?: Json;
30
+ }
31
+ interface FileList {
32
+ files: BurdenoffFile[];
33
+ total: number;
34
+ page: number;
35
+ limit: number;
36
+ hasMore: boolean;
37
+ }
38
+ interface FilePagination {
39
+ limit?: number;
40
+ offset?: number;
41
+ }
42
+ interface UploadFileInput {
43
+ name: string;
44
+ mimeType: string;
45
+ extension: string;
46
+ contentBase64: string;
47
+ description?: string;
48
+ folderId?: string;
49
+ visibility?: FileVisibility;
50
+ tags?: Json;
51
+ }
52
+ interface UploadFileResponse {
53
+ file: BurdenoffFile;
54
+ uploadProgress?: number | null;
55
+ message?: string | null;
56
+ }
57
+ interface FileShare {
58
+ id: string;
59
+ fileId: string;
60
+ shareType: FileShareType;
61
+ accessLevel: FileShareAccessLevel;
62
+ token?: string | null;
63
+ invitedEmail?: string | null;
64
+ invitedUserIds?: string[] | null;
65
+ requiresPassword: boolean;
66
+ expiresAt?: string | null;
67
+ maxDownloads?: number | null;
68
+ accessCount: number;
69
+ downloadCount: number;
70
+ lastAccessedAt?: string | null;
71
+ revokedAt?: string | null;
72
+ revokedBy?: string | null;
73
+ createdById: string;
74
+ createdAt: string;
75
+ updatedAt: string;
76
+ }
77
+ interface CreateShareInput {
78
+ fileId: string;
79
+ shareType: FileShareType;
80
+ accessLevel: FileShareAccessLevel;
81
+ expiresAt?: string;
82
+ password?: string;
83
+ maxDownloads?: number;
84
+ invitedEmail?: string;
85
+ invitedUserIds?: string[];
86
+ }
87
+
88
+ interface FilesShareApi {
89
+ revoke(shareId: string): Promise<FileShare>;
90
+ }
91
+ interface FilesApi {
92
+ list(folderId?: string, pagination?: FilePagination): Promise<FileList>;
93
+ get(id: string): Promise<BurdenoffFile | null>;
94
+ upload(input: UploadFileInput): Promise<UploadFileResponse>;
95
+ download(id: string, expiresInSeconds?: number): Promise<string>;
96
+ share(input: CreateShareInput): Promise<FileShare>;
97
+ shareApi: FilesShareApi;
98
+ }
99
+
100
+ declare const filesModule: SdkModule<FilesApi>;
101
+
102
+ export { type BurdenoffFile, type CreateShareInput, type FileList, type FilePagination, type FileShare, type FileShareAccessLevel, type FileShareType, type FileStatus, type FileVisibility, type FilesApi, type UploadFileInput, type UploadFileResponse, filesModule as default };
@@ -0,0 +1,102 @@
1
+ import { J as Json, S as SdkModule } from '../../module-JDbvil5h.js';
2
+ import 'graphql-request';
3
+
4
+ type FileStatus = 'UPLOADING' | 'ACTIVE' | 'ARCHIVED' | 'DELETED';
5
+ type FileVisibility = 'PRIVATE' | 'TEAM' | 'WORKSPACE' | 'PUBLIC';
6
+ type FileShareType = 'PUBLIC_LINK' | 'EMAIL_INVITE' | 'GROUP_SHARE';
7
+ type FileShareAccessLevel = 'VIEW' | 'COMMENT' | 'DOWNLOAD' | 'EDIT';
8
+ interface BurdenoffFile {
9
+ id: string;
10
+ name: string;
11
+ description?: string | null;
12
+ workspaceId: string;
13
+ folderId?: string | null;
14
+ mimeType: string;
15
+ extension: string;
16
+ size: string;
17
+ s3Key: string;
18
+ s3Bucket: string;
19
+ downloadUrl?: string | null;
20
+ status: FileStatus;
21
+ visibility: FileVisibility;
22
+ starred: boolean;
23
+ downloadCount: number;
24
+ viewCount: number;
25
+ sha256Hash?: string | null;
26
+ uploadedById: string;
27
+ createdAt: string;
28
+ updatedAt: string;
29
+ tags?: Json;
30
+ }
31
+ interface FileList {
32
+ files: BurdenoffFile[];
33
+ total: number;
34
+ page: number;
35
+ limit: number;
36
+ hasMore: boolean;
37
+ }
38
+ interface FilePagination {
39
+ limit?: number;
40
+ offset?: number;
41
+ }
42
+ interface UploadFileInput {
43
+ name: string;
44
+ mimeType: string;
45
+ extension: string;
46
+ contentBase64: string;
47
+ description?: string;
48
+ folderId?: string;
49
+ visibility?: FileVisibility;
50
+ tags?: Json;
51
+ }
52
+ interface UploadFileResponse {
53
+ file: BurdenoffFile;
54
+ uploadProgress?: number | null;
55
+ message?: string | null;
56
+ }
57
+ interface FileShare {
58
+ id: string;
59
+ fileId: string;
60
+ shareType: FileShareType;
61
+ accessLevel: FileShareAccessLevel;
62
+ token?: string | null;
63
+ invitedEmail?: string | null;
64
+ invitedUserIds?: string[] | null;
65
+ requiresPassword: boolean;
66
+ expiresAt?: string | null;
67
+ maxDownloads?: number | null;
68
+ accessCount: number;
69
+ downloadCount: number;
70
+ lastAccessedAt?: string | null;
71
+ revokedAt?: string | null;
72
+ revokedBy?: string | null;
73
+ createdById: string;
74
+ createdAt: string;
75
+ updatedAt: string;
76
+ }
77
+ interface CreateShareInput {
78
+ fileId: string;
79
+ shareType: FileShareType;
80
+ accessLevel: FileShareAccessLevel;
81
+ expiresAt?: string;
82
+ password?: string;
83
+ maxDownloads?: number;
84
+ invitedEmail?: string;
85
+ invitedUserIds?: string[];
86
+ }
87
+
88
+ interface FilesShareApi {
89
+ revoke(shareId: string): Promise<FileShare>;
90
+ }
91
+ interface FilesApi {
92
+ list(folderId?: string, pagination?: FilePagination): Promise<FileList>;
93
+ get(id: string): Promise<BurdenoffFile | null>;
94
+ upload(input: UploadFileInput): Promise<UploadFileResponse>;
95
+ download(id: string, expiresInSeconds?: number): Promise<string>;
96
+ share(input: CreateShareInput): Promise<FileShare>;
97
+ shareApi: FilesShareApi;
98
+ }
99
+
100
+ declare const filesModule: SdkModule<FilesApi>;
101
+
102
+ export { type BurdenoffFile, type CreateShareInput, type FileList, type FilePagination, type FileShare, type FileShareAccessLevel, type FileShareType, type FileStatus, type FileVisibility, type FilesApi, type UploadFileInput, type UploadFileResponse, filesModule as default };