@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,149 @@
1
+ var i=`
2
+ fragment PlatformProductFields on PlatformProduct {
3
+ id name slug description status logoUrl website appUrl docsUrl githubUrl
4
+ statusPageUrl contactEmail supportEmail contactPhone contactAddress
5
+ seoTitle seoDescription seoKeywords ogImage appStoreUrl playStoreUrl
6
+ socialLinks recaptchaSiteKey recaptchaSecretKey rybbitSiteId notificationEmail
7
+ tenantCount activeUsers apiCalls storageGB uptime metadata tags
8
+ createdAt updatedAt
9
+ }
10
+ `,d=`
11
+ fragment KeyboardShortcutFields on KeyboardShortcut {
12
+ id productId shortcutKey eventName category label description
13
+ macKey windowsKey isEnabled isSequence sortOrder createdAt updatedAt
14
+ }
15
+ `,s=`
16
+ fragment ProductContentPageFields on ProductContentPage {
17
+ id productId slug title content contentFormat seoTitle seoDescription
18
+ seoKeywords lastUpdated version isPublished visibility sortOrder tags
19
+ createdAt updatedAt
20
+ }
21
+ `,c=`
22
+ fragment FeatureFlagFields on FeatureFlag {
23
+ id key name description flagType defaultValue status productId category
24
+ previewable metadata tags createdAt updatedAt createdBy updatedBy
25
+ }
26
+ `,l=`
27
+ ${i}
28
+ query PlatformProducts($filter: PlatformProductFilterInput, $limit: Int, $offset: Int) {
29
+ platformProducts(filter: $filter, limit: $limit, offset: $offset) {
30
+ items { ...PlatformProductFields }
31
+ total
32
+ hasMore
33
+ }
34
+ }
35
+ `,p=`
36
+ ${i}
37
+ query PlatformProduct($id: ID!) {
38
+ platformProduct(id: $id) { ...PlatformProductFields }
39
+ }
40
+ `,P=`
41
+ ${i}
42
+ mutation CreatePlatformProduct($input: CreatePlatformProductInput!) {
43
+ createPlatformProduct(input: $input) { ...PlatformProductFields }
44
+ }
45
+ `,m=`
46
+ ${i}
47
+ mutation UpdatePlatformProduct($id: ID!, $input: UpdatePlatformProductInput!) {
48
+ updatePlatformProduct(id: $id, input: $input) { ...PlatformProductFields }
49
+ }
50
+ `,g=`
51
+ mutation DeletePlatformProduct($id: ID!) {
52
+ deletePlatformProduct(id: $id)
53
+ }
54
+ `,F=`
55
+ ${d}
56
+ query KeyboardShortcuts($filter: KeyboardShortcutFilterInput, $limit: Int, $offset: Int) {
57
+ keyboardShortcuts(filter: $filter, limit: $limit, offset: $offset) {
58
+ items { ...KeyboardShortcutFields }
59
+ total
60
+ hasMore
61
+ }
62
+ }
63
+ `,f=`
64
+ ${d}
65
+ query KeyboardShortcut($id: ID!) {
66
+ keyboardShortcut(id: $id) { ...KeyboardShortcutFields }
67
+ }
68
+ `,y=`
69
+ ${d}
70
+ mutation CreateKeyboardShortcut($input: CreateKeyboardShortcutInput!) {
71
+ createKeyboardShortcut(input: $input) { ...KeyboardShortcutFields }
72
+ }
73
+ `,C=`
74
+ ${d}
75
+ mutation UpdateKeyboardShortcut($id: ID!, $input: UpdateKeyboardShortcutInput!) {
76
+ updateKeyboardShortcut(id: $id, input: $input) { ...KeyboardShortcutFields }
77
+ }
78
+ `,S=`
79
+ mutation DeleteKeyboardShortcut($id: ID!) {
80
+ deleteKeyboardShortcut(id: $id)
81
+ }
82
+ `,E=`
83
+ ${s}
84
+ query ContentPages(
85
+ $productId: String
86
+ $filter: ContentPageFilterInput
87
+ $limit: Int
88
+ $offset: Int
89
+ ) {
90
+ contentPages(productId: $productId, filter: $filter, limit: $limit, offset: $offset) {
91
+ items { ...ProductContentPageFields }
92
+ total
93
+ hasMore
94
+ }
95
+ }
96
+ `,T=`
97
+ ${s}
98
+ query ContentPage($id: ID!) {
99
+ contentPage(id: $id) { ...ProductContentPageFields }
100
+ }
101
+ `,A=`
102
+ ${s}
103
+ mutation CreateContentPage($input: CreateContentPageInput!) {
104
+ createContentPage(input: $input) { ...ProductContentPageFields }
105
+ }
106
+ `,I=`
107
+ ${s}
108
+ mutation UpdateContentPage($id: ID!, $input: UpdateContentPageInput!) {
109
+ updateContentPage(id: $id, input: $input) { ...ProductContentPageFields }
110
+ }
111
+ `,b=`
112
+ mutation DeleteContentPage($id: ID!) {
113
+ deleteContentPage(id: $id)
114
+ }
115
+ `,$=`
116
+ ${c}
117
+ query FeatureFlags($filter: FeatureFlagFilterInput, $limit: Int, $offset: Int) {
118
+ featureFlags(filter: $filter, limit: $limit, offset: $offset) {
119
+ items { ...FeatureFlagFields }
120
+ total
121
+ hasMore
122
+ }
123
+ }
124
+ `,h=`
125
+ ${c}
126
+ query FeatureFlag($id: ID!) {
127
+ featureFlag(id: $id) { ...FeatureFlagFields }
128
+ }
129
+ `,_=`
130
+ query EvaluateFeatureFlags($input: EvaluateFeatureFlagsInput!) {
131
+ evaluateFeatureFlags(input: $input) {
132
+ evaluations {
133
+ key
134
+ value
135
+ variant
136
+ reason
137
+ flagType
138
+ errorCode
139
+ }
140
+ }
141
+ }
142
+ `,U=`
143
+ mutation SetWorkspaceFeatureFlagOverride($input: SetWorkspaceFeatureFlagOverrideInput!) {
144
+ setWorkspaceFeatureFlagOverride(input: $input) {
145
+ id featureFlagId workspaceId enabled allowUserOptIn
146
+ createdAt updatedAt createdBy updatedBy
147
+ }
148
+ }
149
+ `;function K(a){let{global:r}=a.gql;return {async list(t){return (await r.request(E,{productId:t?.productId,filter:t?.filter,limit:t?.limit,offset:t?.offset})).contentPages},async get(t){return (await r.request(T,{id:t})).contentPage},async create(t){return (await r.request(A,{input:t})).createContentPage},async update(t,e){return (await r.request(I,{id:t,input:e})).updateContentPage},async delete(t){return (await r.request(b,{id:t})).deleteContentPage}}}function O(a){let{global:r}=a.gql;return {async list(t,e){return (await r.request($,{filter:t,limit:e?.limit,offset:e?.offset})).featureFlags},async get(t){return (await r.request(h,{id:t})).featureFlag},async evaluate(t,e){return (await r.request(_,{input:{workspaceId:t,keys:e}})).evaluateFeatureFlags},async set(t){return (await r.request(U,{input:t})).setWorkspaceFeatureFlagOverride}}}function R(a){let{global:r}=a.gql;return {async list(t,e){return (await r.request(l,{filter:t,limit:e?.limit,offset:e?.offset})).platformProducts},async get(t){return (await r.request(p,{id:t})).platformProduct},async create(t){return (await r.request(P,{input:t})).createPlatformProduct},async update(t,e){return (await r.request(m,{id:t,input:e})).updatePlatformProduct},async delete(t){return (await r.request(g,{id:t})).deletePlatformProduct}}}function x(a){let{global:r}=a.gql;return {async list(t,e){return (await r.request(F,{filter:t,limit:e?.limit,offset:e?.offset})).keyboardShortcuts},async get(t){return (await r.request(f,{id:t})).keyboardShortcut},async create(t){return (await r.request(y,{input:t})).createKeyboardShortcut},async update(t,e){return (await r.request(C,{id:t,input:e})).updateKeyboardShortcut},async delete(t){return (await r.request(S,{id:t})).deleteKeyboardShortcut}}}var L={id:"products",version:"1.0.0",displayName:"Products",dependsOn:["auth"],attach(a){return {products:R(a),shortcuts:x(a),contentPages:K(a),featureFlags:O(a)}}},Z=L;export{Z as default};
@@ -0,0 +1,55 @@
1
+ 'use strict';var a=`
2
+ fragment RbacRole on Role {
3
+ id name description scopeId scopeType isSystem priority createdAt updatedAt
4
+ }
5
+ `,s=`
6
+ fragment RbacPolicyReference on PolicyReference {
7
+ id name description opaPackage resourceType action isActive priority createdAt updatedAt
8
+ }
9
+ `,p=`
10
+ ${a}
11
+ query Roles($scopeId: String!, $filter: RoleFilterInput, $pagination: PaginationInput) {
12
+ roles(scopeId: $scopeId, filter: $filter, pagination: $pagination) {
13
+ ...RbacRole
14
+ }
15
+ }
16
+ `,l=`
17
+ ${a}
18
+ query Role($id: ID!) { role(id: $id) { ...RbacRole } }
19
+ `,R=`
20
+ ${a}
21
+ mutation CreateRole($input: CreateRoleInput!) { createRole(input: $input) { ...RbacRole } }
22
+ `,d=`
23
+ ${a}
24
+ mutation UpdateRole($id: ID!, $input: UpdateRoleInput!) {
25
+ updateRole(id: $id, input: $input) { ...RbacRole }
26
+ }
27
+ `,u=`
28
+ mutation DeleteRole($id: ID!, $reassignToRoleId: ID) {
29
+ deleteRole(id: $id, reassignToRoleId: $reassignToRoleId)
30
+ }
31
+ `,I=`
32
+ query CheckPermission($input: PermissionCheckInput!) {
33
+ checkPermission(input: $input) {
34
+ allowed decisionPath roleLevel roleName overrideType opaPolicy
35
+ }
36
+ }
37
+ `,y=`
38
+ ${s}
39
+ query PolicyReferences($filter: PolicyReferenceFilterInput, $pagination: PaginationInput) {
40
+ policyReferences(filter: $filter, pagination: $pagination) {
41
+ ...RbacPolicyReference
42
+ }
43
+ }
44
+ `,P=`
45
+ ${s}
46
+ mutation AttachPolicyToRole($roleId: ID!, $policyId: ID!) {
47
+ attachPolicyToRole(roleId: $roleId, policyId: $policyId) {
48
+ ...RbacPolicyReference
49
+ }
50
+ }
51
+ `,m=`
52
+ mutation DetachPolicyFromRole($roleId: ID!, $policyId: ID!) {
53
+ detachPolicyFromRole(roleId: $roleId, policyId: $policyId)
54
+ }
55
+ `;function E(i){function c(e){return e==="global"?i.gql.global:i.gql.workspace}return {roles:{async list(e,o,t,r="workspace"){return (await c(r).request(p,{scopeId:e,filter:o,pagination:t})).roles},async get(e,o="workspace"){return (await c(o).request(l,{id:e})).role},async create(e,o="workspace"){return (await c(o).request(R,{input:e})).createRole},async update(e,o,t="workspace"){return (await c(t).request(d,{id:e,input:o})).updateRole},async delete(e,o,t="workspace"){return (await c(t).request(u,{id:e,reassignToRoleId:o??null})).deleteRole}},policies:{async list(e,o,t="workspace"){return (await c(t).request(y,{filter:e,pagination:o})).policyReferences},async attach(e,o,t="workspace"){return (await c(t).request(P,{roleId:e,policyId:o})).attachPolicyToRole},async detach(e,o,t="workspace"){return (await c(t).request(m,{roleId:e,policyId:o})).detachPolicyFromRole}},async check(e,o,t,r="workspace"){return (await c(r).request(I,{input:{actorId:e.actorId,actorType:e.actorType,scopeId:e.scopeId,resourceType:t.resourceType,action:o,resourceId:t.resourceId,attributes:t.attributes}})).checkPermission}}}var C={id:"rbac",version:"1.0.0",displayName:"RBAC",dependsOn:["auth"],attach(i){return E(i)}},x=C;module.exports=x;
@@ -0,0 +1,100 @@
1
+ import { J as Json, P as PaginationInput, S as SdkModule } from '../../module-JDbvil5h.cjs';
2
+ import 'graphql-request';
3
+
4
+ type ActorType = 'user' | 'app' | 'service' | 'super_admin';
5
+ interface Role {
6
+ id: string;
7
+ name: string;
8
+ description?: string | null;
9
+ scopeId: string;
10
+ scopeType: string;
11
+ isSystem: boolean;
12
+ priority: number;
13
+ createdAt: string;
14
+ updatedAt: string;
15
+ }
16
+ interface CreateRoleInput {
17
+ name: string;
18
+ description?: string;
19
+ scopeId: string;
20
+ scopeType?: string;
21
+ isSystem?: boolean;
22
+ priority?: number;
23
+ parentId?: string;
24
+ }
25
+ interface UpdateRoleInput {
26
+ name?: string;
27
+ description?: string;
28
+ priority?: number;
29
+ parentId?: string;
30
+ }
31
+ interface RoleFilterInput {
32
+ search?: string;
33
+ isSystem?: boolean;
34
+ }
35
+ interface PolicyReference {
36
+ id: string;
37
+ name: string;
38
+ description?: string | null;
39
+ opaPackage: string;
40
+ resourceType: string;
41
+ action: string;
42
+ isActive: boolean;
43
+ priority: number;
44
+ createdAt: string;
45
+ updatedAt: string;
46
+ }
47
+ interface PermissionCheckInput {
48
+ actorId: string;
49
+ actorType: ActorType;
50
+ scopeId: string;
51
+ resourceType: string;
52
+ action: string;
53
+ resourceId?: string;
54
+ attributes?: Json;
55
+ }
56
+ interface PermissionCheckResult {
57
+ allowed: boolean;
58
+ decisionPath: string;
59
+ roleLevel?: string | null;
60
+ roleName?: string | null;
61
+ overrideType?: string | null;
62
+ opaPolicy?: string | null;
63
+ }
64
+ type RbacScope = 'workspace' | 'global';
65
+
66
+ interface CheckActor {
67
+ actorId: string;
68
+ actorType: ActorType;
69
+ scopeId: string;
70
+ }
71
+ interface CheckResource {
72
+ resourceType: string;
73
+ resourceId?: string;
74
+ attributes?: unknown;
75
+ }
76
+ interface RolesApi {
77
+ list(scopeId: string, filter?: RoleFilterInput, pagination?: PaginationInput, scope?: RbacScope): Promise<Role[]>;
78
+ get(id: string, scope?: RbacScope): Promise<Role | null>;
79
+ create(input: CreateRoleInput, scope?: RbacScope): Promise<Role>;
80
+ update(id: string, input: UpdateRoleInput, scope?: RbacScope): Promise<Role>;
81
+ delete(id: string, reassignToRoleId?: string, scope?: RbacScope): Promise<boolean>;
82
+ }
83
+ interface PoliciesApi {
84
+ list(filter?: {
85
+ resourceType?: string;
86
+ action?: string;
87
+ isActive?: boolean;
88
+ }, pagination?: PaginationInput, scope?: RbacScope): Promise<PolicyReference[]>;
89
+ attach(roleId: string, policyId: string, scope?: RbacScope): Promise<PolicyReference>;
90
+ detach(roleId: string, policyId: string, scope?: RbacScope): Promise<boolean>;
91
+ }
92
+ interface RbacApi {
93
+ roles: RolesApi;
94
+ policies: PoliciesApi;
95
+ check(actor: CheckActor, action: string, resource: CheckResource, scope?: RbacScope): Promise<PermissionCheckResult>;
96
+ }
97
+
98
+ declare const rbacModule: SdkModule<RbacApi>;
99
+
100
+ export { type ActorType, type CheckActor, type CheckResource, type CreateRoleInput, type PermissionCheckInput, type PermissionCheckResult, type PoliciesApi, type PolicyReference, type RbacApi, type RbacScope, type Role, type RoleFilterInput, type RolesApi, type UpdateRoleInput, rbacModule as default };
@@ -0,0 +1,100 @@
1
+ import { J as Json, P as PaginationInput, S as SdkModule } from '../../module-JDbvil5h.js';
2
+ import 'graphql-request';
3
+
4
+ type ActorType = 'user' | 'app' | 'service' | 'super_admin';
5
+ interface Role {
6
+ id: string;
7
+ name: string;
8
+ description?: string | null;
9
+ scopeId: string;
10
+ scopeType: string;
11
+ isSystem: boolean;
12
+ priority: number;
13
+ createdAt: string;
14
+ updatedAt: string;
15
+ }
16
+ interface CreateRoleInput {
17
+ name: string;
18
+ description?: string;
19
+ scopeId: string;
20
+ scopeType?: string;
21
+ isSystem?: boolean;
22
+ priority?: number;
23
+ parentId?: string;
24
+ }
25
+ interface UpdateRoleInput {
26
+ name?: string;
27
+ description?: string;
28
+ priority?: number;
29
+ parentId?: string;
30
+ }
31
+ interface RoleFilterInput {
32
+ search?: string;
33
+ isSystem?: boolean;
34
+ }
35
+ interface PolicyReference {
36
+ id: string;
37
+ name: string;
38
+ description?: string | null;
39
+ opaPackage: string;
40
+ resourceType: string;
41
+ action: string;
42
+ isActive: boolean;
43
+ priority: number;
44
+ createdAt: string;
45
+ updatedAt: string;
46
+ }
47
+ interface PermissionCheckInput {
48
+ actorId: string;
49
+ actorType: ActorType;
50
+ scopeId: string;
51
+ resourceType: string;
52
+ action: string;
53
+ resourceId?: string;
54
+ attributes?: Json;
55
+ }
56
+ interface PermissionCheckResult {
57
+ allowed: boolean;
58
+ decisionPath: string;
59
+ roleLevel?: string | null;
60
+ roleName?: string | null;
61
+ overrideType?: string | null;
62
+ opaPolicy?: string | null;
63
+ }
64
+ type RbacScope = 'workspace' | 'global';
65
+
66
+ interface CheckActor {
67
+ actorId: string;
68
+ actorType: ActorType;
69
+ scopeId: string;
70
+ }
71
+ interface CheckResource {
72
+ resourceType: string;
73
+ resourceId?: string;
74
+ attributes?: unknown;
75
+ }
76
+ interface RolesApi {
77
+ list(scopeId: string, filter?: RoleFilterInput, pagination?: PaginationInput, scope?: RbacScope): Promise<Role[]>;
78
+ get(id: string, scope?: RbacScope): Promise<Role | null>;
79
+ create(input: CreateRoleInput, scope?: RbacScope): Promise<Role>;
80
+ update(id: string, input: UpdateRoleInput, scope?: RbacScope): Promise<Role>;
81
+ delete(id: string, reassignToRoleId?: string, scope?: RbacScope): Promise<boolean>;
82
+ }
83
+ interface PoliciesApi {
84
+ list(filter?: {
85
+ resourceType?: string;
86
+ action?: string;
87
+ isActive?: boolean;
88
+ }, pagination?: PaginationInput, scope?: RbacScope): Promise<PolicyReference[]>;
89
+ attach(roleId: string, policyId: string, scope?: RbacScope): Promise<PolicyReference>;
90
+ detach(roleId: string, policyId: string, scope?: RbacScope): Promise<boolean>;
91
+ }
92
+ interface RbacApi {
93
+ roles: RolesApi;
94
+ policies: PoliciesApi;
95
+ check(actor: CheckActor, action: string, resource: CheckResource, scope?: RbacScope): Promise<PermissionCheckResult>;
96
+ }
97
+
98
+ declare const rbacModule: SdkModule<RbacApi>;
99
+
100
+ export { type ActorType, type CheckActor, type CheckResource, type CreateRoleInput, type PermissionCheckInput, type PermissionCheckResult, type PoliciesApi, type PolicyReference, type RbacApi, type RbacScope, type Role, type RoleFilterInput, type RolesApi, type UpdateRoleInput, rbacModule as default };
@@ -0,0 +1,55 @@
1
+ var a=`
2
+ fragment RbacRole on Role {
3
+ id name description scopeId scopeType isSystem priority createdAt updatedAt
4
+ }
5
+ `,p=`
6
+ fragment RbacPolicyReference on PolicyReference {
7
+ id name description opaPackage resourceType action isActive priority createdAt updatedAt
8
+ }
9
+ `,l=`
10
+ ${a}
11
+ query Roles($scopeId: String!, $filter: RoleFilterInput, $pagination: PaginationInput) {
12
+ roles(scopeId: $scopeId, filter: $filter, pagination: $pagination) {
13
+ ...RbacRole
14
+ }
15
+ }
16
+ `,R=`
17
+ ${a}
18
+ query Role($id: ID!) { role(id: $id) { ...RbacRole } }
19
+ `,d=`
20
+ ${a}
21
+ mutation CreateRole($input: CreateRoleInput!) { createRole(input: $input) { ...RbacRole } }
22
+ `,u=`
23
+ ${a}
24
+ mutation UpdateRole($id: ID!, $input: UpdateRoleInput!) {
25
+ updateRole(id: $id, input: $input) { ...RbacRole }
26
+ }
27
+ `,I=`
28
+ mutation DeleteRole($id: ID!, $reassignToRoleId: ID) {
29
+ deleteRole(id: $id, reassignToRoleId: $reassignToRoleId)
30
+ }
31
+ `,y=`
32
+ query CheckPermission($input: PermissionCheckInput!) {
33
+ checkPermission(input: $input) {
34
+ allowed decisionPath roleLevel roleName overrideType opaPolicy
35
+ }
36
+ }
37
+ `,P=`
38
+ ${p}
39
+ query PolicyReferences($filter: PolicyReferenceFilterInput, $pagination: PaginationInput) {
40
+ policyReferences(filter: $filter, pagination: $pagination) {
41
+ ...RbacPolicyReference
42
+ }
43
+ }
44
+ `,m=`
45
+ ${p}
46
+ mutation AttachPolicyToRole($roleId: ID!, $policyId: ID!) {
47
+ attachPolicyToRole(roleId: $roleId, policyId: $policyId) {
48
+ ...RbacPolicyReference
49
+ }
50
+ }
51
+ `,E=`
52
+ mutation DetachPolicyFromRole($roleId: ID!, $policyId: ID!) {
53
+ detachPolicyFromRole(roleId: $roleId, policyId: $policyId)
54
+ }
55
+ `;function g(i){function c(e){return e==="global"?i.gql.global:i.gql.workspace}return {roles:{async list(e,o,t,r="workspace"){return (await c(r).request(l,{scopeId:e,filter:o,pagination:t})).roles},async get(e,o="workspace"){return (await c(o).request(R,{id:e})).role},async create(e,o="workspace"){return (await c(o).request(d,{input:e})).createRole},async update(e,o,t="workspace"){return (await c(t).request(u,{id:e,input:o})).updateRole},async delete(e,o,t="workspace"){return (await c(t).request(I,{id:e,reassignToRoleId:o??null})).deleteRole}},policies:{async list(e,o,t="workspace"){return (await c(t).request(P,{filter:e,pagination:o})).policyReferences},async attach(e,o,t="workspace"){return (await c(t).request(m,{roleId:e,policyId:o})).attachPolicyToRole},async detach(e,o,t="workspace"){return (await c(t).request(E,{roleId:e,policyId:o})).detachPolicyFromRole}},async check(e,o,t,r="workspace"){return (await c(r).request(y,{input:{actorId:e.actorId,actorType:e.actorType,scopeId:e.scopeId,resourceType:t.resourceType,action:o,resourceId:t.resourceId,attributes:t.attributes}})).checkPermission}}}var f={id:"rbac",version:"1.0.0",displayName:"RBAC",dependsOn:["auth"],attach(i){return g(i)}},L=f;export{L as default};
@@ -0,0 +1,61 @@
1
+ 'use strict';var i=`
2
+ fragment ScheduledJobFields on ScheduledJob {
3
+ id name description scheduleType cronExpression interval intervalUnit
4
+ rrule timezone startDate endDate status workspaceId metadata payload
5
+ createdAt updatedAt
6
+ }
7
+ `,c=`
8
+ fragment JobExecutionFields on JobExecution {
9
+ id scheduleId status attemptNumber startedAt completedAt
10
+ errorMessage result createdAt updatedAt
11
+ }
12
+ `,r=`
13
+ ${i}
14
+ query ScheduledJobs(
15
+ $workspaceId: ID!
16
+ $filter: JobFilterInput
17
+ $pagination: SchedulerPaginationInput
18
+ ) {
19
+ scheduledJobs(workspaceId: $workspaceId, filter: $filter, pagination: $pagination) {
20
+ edges { cursor node { ...ScheduledJobFields } }
21
+ totalCount
22
+ pageInfo { hasNextPage endCursor }
23
+ }
24
+ }
25
+ `,a=`
26
+ ${i}
27
+ query ScheduledJob($id: ID!) {
28
+ scheduledJob(id: $id) { ...ScheduledJobFields }
29
+ }
30
+ `,s=`
31
+ ${i}
32
+ mutation CreateScheduledJob($workspaceId: ID!, $input: CreateScheduledJobInput!) {
33
+ createScheduledJob(workspaceId: $workspaceId, input: $input) { ...ScheduledJobFields }
34
+ }
35
+ `,p=`
36
+ ${i}
37
+ mutation UpdateScheduledJob($id: ID!, $input: UpdateScheduledJobInput!) {
38
+ updateScheduledJob(id: $id, input: $input) { ...ScheduledJobFields }
39
+ }
40
+ `,l=`
41
+ mutation DeleteScheduledJob($id: ID!) { deleteScheduledJob(id: $id) }
42
+ `,b=`
43
+ ${c}
44
+ query JobExecutions($jobId: ID!, $pagination: SchedulerPaginationInput) {
45
+ jobExecutions(jobId: $jobId, pagination: $pagination) {
46
+ edges { cursor node { ...JobExecutionFields } }
47
+ totalCount
48
+ pageInfo { hasNextPage endCursor }
49
+ }
50
+ }
51
+ `,J=`
52
+ ${c}
53
+ query JobExecution($id: ID!) {
54
+ jobExecution(id: $id) { ...JobExecutionFields }
55
+ }
56
+ `,E=`
57
+ ${c}
58
+ mutation RetryJobExecution($executionId: ID!) {
59
+ retryJobExecution(executionId: $executionId) { ...JobExecutionFields }
60
+ }
61
+ `;function S(d){let{workspace:o}=d.gql;return {async list(e,t){return (await o.request(b,{jobId:e,pagination:t})).jobExecutions},async get(e){return (await o.request(J,{id:e})).jobExecution},async retry(e){return (await o.request(E,{executionId:e})).retryJobExecution}}}function x(d){let{workspace:o}=d.gql;return {async list(e,t,n){return (await o.request(r,{workspaceId:e,filter:t,pagination:n})).scheduledJobs},async get(e){return (await o.request(a,{id:e})).scheduledJob},async create(e,t){return (await o.request(s,{workspaceId:e,input:t})).createScheduledJob},async update(e,t){return (await o.request(p,{id:e,input:t})).updateScheduledJob},async delete(e){return (await o.request(l,{id:e})).deleteScheduledJob}}}var h={id:"scheduler",version:"1.0.0",displayName:"Scheduler",dependsOn:["auth"],attach(d){return {jobs:x(d),executions:S(d)}}},w=h;module.exports=w;
@@ -0,0 +1,121 @@
1
+ import { J as Json, S as SdkModule } from '../../module-JDbvil5h.cjs';
2
+ import 'graphql-request';
3
+
4
+ type JobStatus = 'ACTIVE' | 'ARCHIVED' | 'DISABLED' | 'ERROR' | 'PAUSED' | 'PENDING' | 'RUNNING';
5
+ type ScheduleType = 'CRON' | 'INTERVAL' | 'ONE_TIME' | 'RRULE';
6
+ interface ScheduledJob {
7
+ id: string;
8
+ name: string;
9
+ description?: string | null;
10
+ scheduleType: ScheduleType;
11
+ cronExpression?: string | null;
12
+ interval?: number | null;
13
+ intervalUnit?: string | null;
14
+ rrule?: string | null;
15
+ timezone?: string | null;
16
+ startDate?: string | null;
17
+ endDate?: string | null;
18
+ status: JobStatus;
19
+ workspaceId: string;
20
+ metadata?: Json;
21
+ payload?: Json;
22
+ createdAt: string;
23
+ updatedAt: string;
24
+ }
25
+ interface ScheduledJobConnection {
26
+ edges: Array<{
27
+ cursor: string;
28
+ node: ScheduledJob;
29
+ }>;
30
+ totalCount: number;
31
+ pageInfo: {
32
+ hasNextPage: boolean;
33
+ endCursor?: string | null;
34
+ };
35
+ }
36
+ interface CreateScheduledJobInput {
37
+ name: string;
38
+ scheduleType: ScheduleType;
39
+ description?: string;
40
+ cronExpression?: string;
41
+ interval?: number;
42
+ intervalUnit?: string;
43
+ rrule?: string;
44
+ timezone?: string;
45
+ startDate?: string;
46
+ endDate?: string;
47
+ metadata?: Json;
48
+ payload?: Json;
49
+ }
50
+ interface UpdateScheduledJobInput {
51
+ name?: string;
52
+ description?: string;
53
+ scheduleType?: ScheduleType;
54
+ cronExpression?: string;
55
+ interval?: number;
56
+ intervalUnit?: string;
57
+ rrule?: string;
58
+ timezone?: string;
59
+ startDate?: string;
60
+ endDate?: string;
61
+ status?: JobStatus;
62
+ metadata?: Json;
63
+ payload?: Json;
64
+ }
65
+ interface JobFilterInput {
66
+ status?: JobStatus;
67
+ scheduleType?: ScheduleType;
68
+ search?: string;
69
+ }
70
+ interface SchedulerPaginationInput {
71
+ cursor?: string;
72
+ limit?: number;
73
+ offset?: number;
74
+ sortBy?: string;
75
+ sortOrder?: 'asc' | 'desc';
76
+ }
77
+ interface JobExecution {
78
+ id: string;
79
+ scheduleId: string;
80
+ status: string;
81
+ attemptNumber: number;
82
+ startedAt?: string | null;
83
+ completedAt?: string | null;
84
+ errorMessage?: string | null;
85
+ result?: Json;
86
+ createdAt: string;
87
+ updatedAt: string;
88
+ }
89
+ interface JobExecutionConnection {
90
+ edges: Array<{
91
+ cursor: string;
92
+ node: JobExecution;
93
+ }>;
94
+ totalCount: number;
95
+ pageInfo: {
96
+ hasNextPage: boolean;
97
+ endCursor?: string | null;
98
+ };
99
+ }
100
+
101
+ interface ExecutionsApi {
102
+ list(jobId: string, pagination?: SchedulerPaginationInput): Promise<JobExecutionConnection>;
103
+ get(id: string): Promise<JobExecution | null>;
104
+ retry(executionId: string): Promise<JobExecution>;
105
+ }
106
+
107
+ interface JobsApi {
108
+ list(workspaceId: string, filter?: JobFilterInput, pagination?: SchedulerPaginationInput): Promise<ScheduledJobConnection>;
109
+ get(id: string): Promise<ScheduledJob | null>;
110
+ create(workspaceId: string, input: CreateScheduledJobInput): Promise<ScheduledJob>;
111
+ update(id: string, input: UpdateScheduledJobInput): Promise<ScheduledJob>;
112
+ delete(id: string): Promise<boolean>;
113
+ }
114
+
115
+ interface SchedulerApi {
116
+ jobs: JobsApi;
117
+ executions: ExecutionsApi;
118
+ }
119
+ declare const schedulerModule: SdkModule<SchedulerApi>;
120
+
121
+ export { type CreateScheduledJobInput, type ExecutionsApi, type JobExecution, type JobExecutionConnection, type JobFilterInput, type JobStatus, type JobsApi, type ScheduleType, type ScheduledJob, type ScheduledJobConnection, type SchedulerApi, type SchedulerPaginationInput, type UpdateScheduledJobInput, schedulerModule as default };