@antcde/connect-ts 0.4.38-rc.1 → 0.4.39-rc.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.
Files changed (61) hide show
  1. package/build/AntConnect.d.ts +2 -1
  2. package/build/AntConnect.d.ts.map +1 -1
  3. package/build/AntConnect.js +2 -15
  4. package/build/comms/signalTypes.d.ts +5 -0
  5. package/build/comms/signalTypes.d.ts.map +1 -1
  6. package/build/index.d.ts +5 -2
  7. package/build/index.d.ts.map +1 -1
  8. package/build/index.js +1 -0
  9. package/build/service-types.d.ts +2 -1
  10. package/build/service-types.d.ts.map +1 -1
  11. package/build/services/AppService/factory/resourceAccess.d.ts +1 -1
  12. package/build/services/AppService/factory/resourceAccess.d.ts.map +1 -1
  13. package/build/services/AppService/factory/resourceAccess.js +2 -0
  14. package/build/services/AppService/types/resourceEntitlements.d.ts +6 -0
  15. package/build/services/AppService/types/resourceEntitlements.d.ts.map +1 -1
  16. package/build/services/BroadcastingService.d.ts +11 -0
  17. package/build/services/BroadcastingService.d.ts.map +1 -0
  18. package/build/services/BroadcastingService.js +7 -0
  19. package/build/services/LicenseCompanyPeople.types.d.ts +34 -0
  20. package/build/services/LicenseCompanyPeople.types.d.ts.map +1 -0
  21. package/build/services/LicenseCompanyPeople.types.js +3 -0
  22. package/build/services/LicenseMemberErrors.types.d.ts +42 -0
  23. package/build/services/LicenseMemberErrors.types.d.ts.map +1 -0
  24. package/build/services/LicenseMemberErrors.types.js +27 -0
  25. package/build/services/LicenseService.d.ts +40 -15
  26. package/build/services/LicenseService.d.ts.map +1 -1
  27. package/build/services/LicenseService.js +9 -1
  28. package/build/services/LicenseService.types.d.ts +139 -0
  29. package/build/services/LicenseService.types.d.ts.map +1 -0
  30. package/build/services/LicenseService.types.js +15 -0
  31. package/build/services/Notifications/NotificationService.d.ts +7 -2
  32. package/build/services/Notifications/NotificationService.d.ts.map +1 -1
  33. package/build/services/Project/ProjectUserService.d.ts +0 -5
  34. package/build/services/Project/ProjectUserService.d.ts.map +1 -1
  35. package/build/services/Project/ProjectUserService.js +0 -1
  36. package/build/services/RBAC/RoleService.d.ts +0 -1
  37. package/build/services/RBAC/RoleService.d.ts.map +1 -1
  38. package/build/services/RBAC/RoleService.js +0 -1
  39. package/build/services/ResellerService.d.ts +17 -3
  40. package/build/services/ResellerService.d.ts.map +1 -1
  41. package/build/services/ResellerService.js +8 -0
  42. package/build/services/ResellerService.types.d.ts +112 -0
  43. package/build/services/ResellerService.types.d.ts.map +1 -0
  44. package/build/services/ResellerService.types.js +22 -0
  45. package/build/services/ScriptsService.d.ts +3 -9
  46. package/build/services/ScriptsService.d.ts.map +1 -1
  47. package/build/services/Trigger/TriggerDatasetResponses.types.d.ts +12 -6
  48. package/build/services/Trigger/TriggerDatasetResponses.types.d.ts.map +1 -1
  49. package/build/services/Trigger/TriggerDatasetResponses.types.js +3 -0
  50. package/build/services/Trigger/TriggerHistoryService.d.ts +19 -19
  51. package/build/services/Trigger/TriggerHistoryService.d.ts.map +1 -1
  52. package/build/services/Trigger/TriggerLastRun.types.d.ts +10 -14
  53. package/build/services/Trigger/TriggerLastRun.types.d.ts.map +1 -1
  54. package/build/services/Trigger/TriggerRefusalDetail.types.d.ts +12 -6
  55. package/build/services/Trigger/TriggerRefusalDetail.types.d.ts.map +1 -1
  56. package/build/services/UserService.d.ts +7 -9
  57. package/build/services/UserService.d.ts.map +1 -1
  58. package/build/types.d.ts +1 -126
  59. package/build/types.d.ts.map +1 -1
  60. package/build/types.js +2 -19
  61. package/package.json +3 -3
@@ -0,0 +1,139 @@
1
+ import type { LicenseResellerRef } from './ResellerService.types';
2
+ /** Free or Pro. Mirrors the backend `App\Enums\LicensePlan` enum. */
3
+ export type LicensePlan = 'free' | 'pro';
4
+ /** A member holds a seat; a guest is free and read-only. */
5
+ export type LicenseMemberType = 'user' | 'guest';
6
+ /** Derived by the backend (AAD-1149): `sponsored` = other-domain user billed here on Pro, `pro_elsewhere` = covered by their own Pro license. */
7
+ export type LicenseSeatKind = 'user' | 'guest' | 'sponsored' | 'pro_elsewhere';
8
+ /** The limits a plan sets. Mirrors the backend `App\Enums\LicenseLimitKey` enum. */
9
+ export type LicenseLimitKey = 'users' | 'projects' | 'dms_storage_bytes' | 'table_db_bytes' | 'trigger_runs_month' | 'trigger_script_calls_month' | 'parallel_sessions';
10
+ export type LicenseLimitUnit = 'count' | 'bytes';
11
+ /** Where an effective limit comes from: the plan, or a per-license override set by staff. */
12
+ export type LicenseLimitSource = 'plan' | 'override';
13
+ /** One limit of a license with its usage, as `GET /licenses/{id}/entitlements` reports it. */
14
+ export interface LicenseEntitlement {
15
+ /** null = unlimited */
16
+ limit: number | null;
17
+ /** null = not metered yet, or a soft meter without a measurement */
18
+ usage: number | null;
19
+ remaining: number | null;
20
+ unit: LicenseLimitUnit;
21
+ source: LicenseLimitSource;
22
+ /** Read from the nightly usage snapshot (`measured_at`): new table data is refused once it reaches the limit (AAD-1152). */
23
+ soft: boolean;
24
+ measured_at: string | null;
25
+ /** Monthly limits (trigger runs, script calls, AAD-1151): when usage starts again from zero, the 1st of next month UTC; null for the others. */
26
+ resets_at: string | null;
27
+ }
28
+ export interface LicenseSeats {
29
+ /** Members holding a seat (every member type but guest) */
30
+ users: number;
31
+ guests: number;
32
+ /** Of `users`: other-domain members this license sponsors (billed on Pro) */
33
+ sponsored: number;
34
+ /** Of `users`: other-domain members covered by their own Pro license (free here) */
35
+ pro_elsewhere: number;
36
+ }
37
+ /** `PUT /licenses/{id}/users/{userId}/member-type` body. */
38
+ export interface SetMemberTypeData {
39
+ member_type: LicenseMemberType;
40
+ /** Required true when guest → user adds a billed sponsored seat (see `PaidSeatConfirmationRequiredError`). */
41
+ confirm_paid_seat?: boolean;
42
+ }
43
+ export interface LicenseEntitlements {
44
+ plan: LicensePlan;
45
+ quotas: Record<LicenseLimitKey, LicenseEntitlement>;
46
+ seats: LicenseSeats;
47
+ /** The linked reseller (AAD-1154); null while Free and unlinked. */
48
+ reseller?: LicenseResellerRef | null;
49
+ /** The open Pro request, for the Plan & usage banner (AAD-1154). */
50
+ pending_plan_request?: {
51
+ id: string;
52
+ reseller: LicenseResellerRef;
53
+ created_at: string | null;
54
+ } | null;
55
+ }
56
+ /** `GET /license-plans`: the configured limit per key and plan; null = unlimited. No prices. */
57
+ export type LicensePlanLimits = Record<LicensePlan, Record<LicenseLimitKey, number | null>>;
58
+ /** @deprecated Read `plan`: 'enterprise' mirrors Pro, 'community' Free (AAD-1159). */
59
+ export type LicenseType = 'community' | 'enterprise';
60
+ /**
61
+ * Details about a license limit that has been exceeded.
62
+ */
63
+ export interface LicenseLimitDetails {
64
+ /** Limit key that was hit, e.g. 'users', 'projects', 'dms_storage_bytes' */
65
+ resource: string;
66
+ /** Legacy mirror of the plan: 'enterprise' for Pro, 'community' for Free */
67
+ license_type: LicenseType;
68
+ /** Name of the license that hit the limit; absent when unknown */
69
+ license_name?: string;
70
+ /** Maximum allowed; bytes for storage keys */
71
+ limit: number;
72
+ /** Current usage, in the unit of `limit` */
73
+ usage: number;
74
+ remaining: number;
75
+ /** What the refused request asked for, in the unit of `limit` */
76
+ requested?: number;
77
+ /** Whether a Pro plan would lift this limit */
78
+ upgrade_required: boolean;
79
+ /** Set when the plan engine raised the error (AAD-1146) */
80
+ plan?: LicensePlan;
81
+ unit?: LicenseLimitUnit;
82
+ license_id?: string;
83
+ }
84
+ /** The 403 body when a write would exceed a license limit, e.g. a 6th project on Free. */
85
+ export interface LicenseLimitExceededError {
86
+ /** Error code identifying this as a license limit error */
87
+ error: 'LICENSE_LIMIT_EXCEEDED';
88
+ /** Human-readable error message */
89
+ message: string;
90
+ /** Detailed information about the limit */
91
+ details: LicenseLimitDetails;
92
+ }
93
+ /**
94
+ * The 429 a trigger webhook answers once the License used this month's trigger runs or script
95
+ * calls (AAD-1151); `Retry-After` carries the seconds until `resets_at`. The License is not named.
96
+ */
97
+ export interface TriggerQuotaExceededError {
98
+ error: 'LICENSE_LIMIT_EXCEEDED';
99
+ quota: 'trigger_runs_month' | 'trigger_script_calls_month';
100
+ message: string;
101
+ resets_at: string;
102
+ trigger_id: string;
103
+ }
104
+ /**
105
+ * True when an error response body is a `LicenseLimitExceededError`. The 429 `TriggerQuotaExceededError`
106
+ * shares its `error` code but has no `details`, so the details the callers read are checked too.
107
+ */
108
+ export declare function isLicenseLimitError(error: unknown): error is LicenseLimitExceededError;
109
+ /**
110
+ * Resource types that can have limits: the legacy keys, plus the plan storage keys (bytes).
111
+ */
112
+ export type LimitResourceType = 'records' | 'total_records' | 'tables' | 'projects' | 'users' | 'rbac_roles' | 'dms_storage_mb' | 'sbs_records' | 'triggers' | 'dms_storage_bytes' | 'table_db_bytes';
113
+ /**
114
+ * Scope at which a limit applies.
115
+ */
116
+ export type LimitScope = 'table' | 'project' | 'license';
117
+ /** A limit's state: a count, MB for `dms_storage_mb`, bytes for the `*_bytes` keys. */
118
+ export interface ResourceLimitInfo {
119
+ /** Maximum allowed (null = unlimited) */
120
+ limit: number | null;
121
+ /** Current usage (count, MB or bytes depending on resource type) */
122
+ usage: number;
123
+ /** Remaining capacity (null = unlimited) */
124
+ remaining: number | null;
125
+ }
126
+ export interface LimitChangeEvent {
127
+ /** Type of resource limit that changed */
128
+ resource_type: LimitResourceType;
129
+ /** ID of the resource whose limit changed (table_id, project_id, license_id) */
130
+ resource_id: string;
131
+ /** Level at which this limit applies */
132
+ scope: LimitScope;
133
+ /** ID of the scope container (table_id, project_id, or license_id) */
134
+ scope_id: string;
135
+ /** Updated limit values */
136
+ limits: ResourceLimitInfo;
137
+ }
138
+ export * from './LicenseMemberErrors.types';
139
+ //# sourceMappingURL=LicenseService.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LicenseService.types.d.ts","sourceRoot":"","sources":["../../src/services/LicenseService.types.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAMjE,qEAAqE;AACrE,MAAM,MAAM,WAAW,GAA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M,CAAA;IACf,2CAA2C;IAC3C,OAAO,EAAE,mBAAmB,CAAA;CAC7B;AAED;;;GAGG;AACH,MAAM,WAAW,yBAAyB;IACxC,KAAK,EAAE,wBAAwB,CAAA;IAC/B,KAAK,EAAE,oBAAoB,GAAG,4BAA4B,CAAA;IAC1D,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,EAAE,MAAM,CAAA;CACnB;AAID;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,yBAAyB,CAKtF;AAMD;;GAEG;AACH,MAAM,MAAM,iBAAiB,GACzB,SAAS,GACP,eAAe,GACf,QAAQ,GACR,UAAU,GACV,OAAO,GACP,YAAY,GACZ,gBAAgB,GAChB,aAAa,GACb,UAAU,GACV,mBAAmB,GACnB,gBAAgB,CAAA;AAEtB;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,CAAA;AAExD,uFAAuF;AACvF,MAAM,WAAW,iBAAiB;IAChC,yCAAyC;IACzC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,oEAAoE;IACpE,KAAK,EAAE,MAAM,CAAA;IACb,4CAA4C;IAC5C,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;CACzB;AAGD,MAAM,WAAW,gBAAgB;IAC/B,0CAA0C;IAC1C,aAAa,EAAE,iBAAiB,CAAA;IAChC,gFAAgF;IAChF,WAAW,EAAE,MAAM,CAAA;IACnB,wCAAwC;IACxC,KAAK,EAAE,UAAU,CAAA;IACjB,sEAAsE;IACtE,QAAQ,EAAE,MAAM,CAAA;IAChB,2BAA2B;IAC3B,MAAM,EAAE,iBAAiB,CAAA;CAC1B;AAGD,cAAc,6BAA6B,CAAA"}
@@ -0,0 +1,15 @@
1
+ // License plans and limits (AAD-1146): mirrors the backend enums, the limit 403 body,
2
+ // `GET /license-plans` and `GET /licenses/{id}/entitlements`.
3
+ const isObject = (value) => typeof value === 'object' && value !== null;
4
+ /**
5
+ * True when an error response body is a `LicenseLimitExceededError`. The 429 `TriggerQuotaExceededError`
6
+ * shares its `error` code but has no `details`, so the details the callers read are checked too.
7
+ */
8
+ export function isLicenseLimitError(error) {
9
+ if (!isObject(error) || error.error !== 'LICENSE_LIMIT_EXCEEDED' || typeof error.message !== 'string' || !isObject(error.details))
10
+ return false;
11
+ const { resource, limit, usage } = error.details;
12
+ return typeof resource === 'string' && typeof limit === 'number' && typeof usage === 'number';
13
+ }
14
+ // Re-exported so the public surface is unchanged
15
+ export * from './LicenseMemberErrors.types';
@@ -1,11 +1,13 @@
1
1
  import type { AntHttpClient } from "../../AntHttpClient";
2
2
  export type NotificationFrequency = 'immediate' | 'daily' | 'weekly' | 'off';
3
- export type NotificationTopic = 'task' | 'dms' | 'store';
3
+ export type NotificationTopic = 'task' | 'dms' | 'store' | 'license';
4
4
  export type TaskNotificationEvent = 'task.assigned' | 'task.opened_for_role' | 'task.mentioned';
5
5
  export type DmsNotificationEvent = 'dms.file_uploaded' | 'dms.file_deleted';
6
6
  /** License admins: a release channel has a version to install (AAD-1134). Immediate or `off`. */
7
7
  export type StoreNotificationEvent = 'store.channel_available';
8
- export type NotificationEvent = TaskNotificationEvent | DmsNotificationEvent | StoreNotificationEvent;
8
+ /** License admins (AAD-1154, AAD-1150, AAD-1151): immediate mail or `off`. */
9
+ export type LicenseNotificationEvent = 'license.plan_request_submitted' | 'license.plan_request_approved' | 'license.plan_request_declined' | 'license.upgrade_nudged' | 'license.access_revoked' | 'license.access_restored' | 'license.company_signup' | 'license.usage_warning';
10
+ export type NotificationEvent = TaskNotificationEvent | DmsNotificationEvent | StoreNotificationEvent | LicenseNotificationEvent;
9
11
  export type DmsSubscribableType = 'project' | 'license';
10
12
  interface NotificationRuleBase {
11
13
  id?: string;
@@ -30,6 +32,9 @@ export type NotificationRule = (NotificationRuleBase & {
30
32
  }) | (NotificationRuleBase & {
31
33
  topic: 'store';
32
34
  event: StoreNotificationEvent;
35
+ }) | (NotificationRuleBase & {
36
+ topic: 'license';
37
+ event: LicenseNotificationEvent;
33
38
  });
34
39
  export interface DmsSubscriptionState {
35
40
  enabled: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"NotificationService.d.ts","sourceRoot":"","sources":["../../../src/services/Notifications/NotificationService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,4BAAuB;AAEpD,MAAM,MAAM,qBAAqB,GAAG,WAAW,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAA;AAC5E,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,KAAK,GAAG,OAAO,CAAA;AAExD,MAAM,MAAM,qBAAqB,GAAG,eAAe,GAAG,sBAAsB,GAAG,gBAAgB,CAAA;AAC/F,MAAM,MAAM,oBAAoB,GAAG,mBAAmB,GAAG,kBAAkB,CAAA;AAC3E,iGAAiG;AACjG,MAAM,MAAM,sBAAsB,GAAG,yBAAyB,CAAA;AAC9D,MAAM,MAAM,iBAAiB,GAAG,qBAAqB,GAAG,oBAAoB,GAAG,sBAAsB,CAAA;AAErG,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG,SAAS,CAAA;AAEvD,UAAU,oBAAoB;IAC5B,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,qBAAqB,CAAA;IAChC,QAAQ,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAA;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAA;IACpC,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAED;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GACtB,CAAC,oBAAoB,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,qBAAqB,CAAA;CAAE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,MAAM,KAAK,OAAO,CAAC,oBAAoB,CAAC,CAAA;IACpH,kBAAkB,EAAE,CAAC,KAAK,EAAE,oBAAoB,KAAK,OAAO,CAAC,oBAAoB,CAAC,CAAA;IAClF,oBAAoB,EAAE,MAAM,OAAO,CAAC,sBAAsB,EAAE,CAAC,CAAA;CAC9D;AAED,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,aAAa,GAAG,mBAAmB,CAYrF;AAED,eAAe,mBAAmB,CAAA"}
@@ -1,10 +1,6 @@
1
1
  import type { User } from '../UserService';
2
2
  import type { AntHttpClient } from "../../AntHttpClient";
3
3
  import type { DataWrapper } from "../../types";
4
- export interface ProjectUserData {
5
- email: string;
6
- roles: string[];
7
- }
8
4
  export interface ProjectUserSearchParams {
9
5
  q?: string;
10
6
  type?: 'all' | 'name' | 'email';
@@ -13,7 +9,6 @@ export interface ProjectUserSearchParams {
13
9
  }
14
10
  export interface ProjectUserService {
15
11
  fetchUsers: (projectId: string, params?: ProjectUserSearchParams) => Promise<DataWrapper<User[]>>;
16
- addUser: (projectId: string, data: ProjectUserData) => Promise<DataWrapper<User>>;
17
12
  removeUser: (projectId: string, userId: string) => Promise<void>;
18
13
  }
19
14
  export declare function newProjectUserService(client: AntHttpClient): ProjectUserService;
@@ -1 +1 @@
1
- {"version":3,"file":"ProjectUserService.d.ts","sourceRoot":"","sources":["../../../src/services/Project/ProjectUserService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,KAAK,EAAE,aAAa,EAAE,4BAAuB;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,oBAAe;AAE1C,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,EAAE,CAAA;CAChB;AAED,MAAM,WAAW,uBAAuB;IACtC,CAAC,CAAC,EAAE,MAAM,CAAA;IACV,IAAI,CAAC,EAAE,KAAK,GAAG,MAAM,GAA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IAAI,CAAC,CAAA;CACjE;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,aAAa,GAAG,kBAAkB,CAO/E"}
@@ -1,7 +1,6 @@
1
1
  export function newProjectUserService(client) {
2
2
  return {
3
3
  fetchUsers: (projectId, params) => client.get(`/projects/${projectId}/users`, params ? { params } : undefined),
4
- addUser: (projectId, data) => client.post(`/projects/${projectId}/users`, data),
5
4
  removeUser: (projectId, userId) => client.delete(`/projects/${projectId}/users/${userId}`),
6
5
  };
7
6
  }
@@ -34,7 +34,6 @@ export interface RBACRoleService {
34
34
  deleteRole: (resourceType: RoleResourceType, resourceId: string, roleId: string) => Promise<void>;
35
35
  givePermission: (roleId: string, permission: PermissionData) => Promise<DataWrapper<Permission>>;
36
36
  revokePermission: (roleId: string, permission: PermissionData) => Promise<DataWrapper<Permission>>;
37
- syncUsers: (roleId: string, users: string[]) => Promise<DataWrapper<User[]>>;
38
37
  addUserRole: (userId: string, roleId: string, data?: UserRoleData) => Promise<DataWrapper<Role>>;
39
38
  removeUserRole: (userId: string, roleId: string) => Promise<void>;
40
39
  }
@@ -1 +1 @@
1
- {"version":3,"file":"RoleService.d.ts","sourceRoot":"","sources":["../../../src/services/RBAC/RoleService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACrE,OAAO,KAAK,EAAE,aAAa,EAAE,4BAAuB;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,oBAAe;AAE1C,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG,UAAU,CAAA;AAEtD,MAAM,WAAW,IAAI;IACnB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,OAAO,CAAA;IACjB,WAAW,CAAC,EAAE,UAAU,EAAE,CAAA;IAC1B,KAAK,CAAC,EAAE,IAA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EAAE,MAAM,EAAE,UAAU,EAAE,cAAc,KAAK,OAAO,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC,CAAA;IAElG,WAAW,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,YAAY,KAAK,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAA;IAChG,cAAc,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;CAClE;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,aAAa,GAAG,eAAe,CA0BzE"}
@@ -6,7 +6,6 @@ export function newRBACRoleService(client) {
6
6
  deleteRole: (resourceType, resourceId, roleId) => client.delete(`/rbac/${resourceType}/${resourceId}/roles/${roleId}`),
7
7
  givePermission: (roleId, permission) => client.post(`/rbac/roles/${roleId}/permissions`, permission),
8
8
  revokePermission: (roleId, permission) => client.delete(`/rbac/roles/${roleId}/permissions`, { data: permission }),
9
- syncUsers: (roleId, users) => client.post(`/rbac/roles/${roleId}/sync/users`, users),
10
9
  addUserRole: (userId, roleId, data) => client.post(`/rbac/users/${userId}/roles/${roleId}`, data),
11
10
  removeUserRole: (userId, roleId) => client.delete(`/rbac/users/${userId}/roles/${roleId}`),
12
11
  };
@@ -1,5 +1,7 @@
1
+ import type { ApprovePlanRequestData, DeclinePlanRequestData, LicensePlanRequest, LicensePlanRequestStatus, LicenseReseller, ResellerCustomer, RevokeAccessData } from './ResellerService.types';
1
2
  import type { MessageResponse } from "../AntConnect";
2
3
  import type { AntHttpClient } from "../AntHttpClient";
4
+ /** Legacy reseller directory (`/resellers`); the old register picker reads it until AAD-1157. */
3
5
  export interface Reseller {
4
6
  id: string;
5
7
  name: string;
@@ -13,10 +15,22 @@ export interface ResellerForm {
13
15
  blurb?: string;
14
16
  contact?: string;
15
17
  }
16
- /**
17
- * For CUD action, you need elevated access. Getting is public access.
18
- */
18
+ /** Up to `restoreAccess` is AAD-1154 (404 while license plans are off); the rest is the legacy directory. */
19
19
  export interface ResellerService {
20
+ list: () => Promise<LicenseReseller[]>;
21
+ /** Pro requests addressed to a reseller license, newest first. */
22
+ requests: (resellerLicenseId: string, status?: LicensePlanRequestStatus) => Promise<LicensePlanRequest[]>;
23
+ planRequest: (requestId: string) => Promise<LicensePlanRequest>;
24
+ /** The license becomes Pro, linked to this reseller; 409 once no longer pending. */
25
+ approve: (requestId: string, data?: ApprovePlanRequestData) => Promise<LicensePlanRequest>;
26
+ /** The reason is mandatory; the license stays Free. */
27
+ decline: (requestId: string, data: DeclinePlanRequestData) => Promise<LicensePlanRequest>;
28
+ /** The licenses linked to a reseller license, by name, its own self-link left out. */
29
+ customers: (resellerLicenseId: string) => Promise<ResellerCustomer[]>;
30
+ /** Suspend a customer: its members get `LICENSE_ACCESS_REVOKED` until restored; nothing is deleted. 409 when already suspended. */
31
+ revokeAccess: (licenseId: string, data?: RevokeAccessData) => Promise<ResellerCustomer>;
32
+ /** 409 when not suspended. */
33
+ restoreAccess: (licenseId: string) => Promise<ResellerCustomer>;
20
34
  getResellers: () => Promise<Reseller[]>;
21
35
  createReseller: (data: ResellerForm) => Promise<Reseller>;
22
36
  updateReseller: (id: string, data: ResellerForm) => Promise<Reseller>;
@@ -1 +1 @@
1
- {"version":3,"file":"ResellerService.d.ts","sourceRoot":"","sources":["../../src/services/ResellerService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,sBAAoB;AACnD,OAAO,KAAK,EAAE,aAAa,EAAE,yBAAuB;AAEpD,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,KAA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AAG,eAAe,CAqB7E"}
@@ -1,5 +1,13 @@
1
1
  export function newResellerService(httpClient) {
2
2
  return {
3
+ list: () => httpClient.get('/license-resellers').then(r => r.data),
4
+ requests: (resellerLicenseId, status) => httpClient.get(`/licenses/${resellerLicenseId}/reseller/requests`, { params: { status } }).then(r => r.data),
5
+ planRequest: requestId => httpClient.get(`/plan-requests/${requestId}`).then(r => r.data),
6
+ approve: (requestId, data = {}) => httpClient.post(`/plan-requests/${requestId}/approve`, data).then(r => r.data),
7
+ decline: (requestId, data) => httpClient.post(`/plan-requests/${requestId}/decline`, data).then(r => r.data),
8
+ customers: resellerLicenseId => httpClient.get(`/licenses/${resellerLicenseId}/reseller/customers`).then(r => r.data),
9
+ revokeAccess: (licenseId, data = {}) => httpClient.post(`/licenses/${licenseId}/revoke-access`, data).then(r => r.data),
10
+ restoreAccess: licenseId => httpClient.post(`/licenses/${licenseId}/restore-access`).then(r => r.data),
3
11
  getResellers: () => httpClient.get('/resellers'),
4
12
  createReseller: data => httpClient.post('/resellers', data),
5
13
  updateReseller: (id, data) => httpClient.put(`/resellers/${id}`, data),
@@ -0,0 +1,112 @@
1
+ import type { LicenseLimitKey } from './LicenseService.types';
2
+ /** The reseller a license is linked to, as `License.reseller` names it. */
3
+ export interface LicenseResellerRef {
4
+ license_id: string;
5
+ name: string;
6
+ }
7
+ /** An active reseller as the Request Pro picker shows it (`GET /license-resellers`). No prices. */
8
+ export interface LicenseReseller extends LicenseResellerRef {
9
+ theme: string | null;
10
+ monogram: string;
11
+ logo_url: string | null;
12
+ logo_dark_url: string | null;
13
+ website: string | null;
14
+ description: string | null;
15
+ /** The reseller's own inbox, else its publisher contact. */
16
+ contact_email: string | null;
17
+ }
18
+ /** Mirrors the backend `App\Enums\LicensePlanRequestStatus` enum. Terminal rows stay as history. */
19
+ export type LicensePlanRequestStatus = 'pending' | 'approved' | 'declined' | 'cancelled';
20
+ /** A Pro request as both sides see it. No prices. */
21
+ export interface LicensePlanRequest {
22
+ id: string;
23
+ status: LicensePlanRequestStatus;
24
+ license: {
25
+ id: string;
26
+ name: string;
27
+ primary_domain: string | null;
28
+ };
29
+ reseller: LicenseResellerRef;
30
+ requested_by: {
31
+ id: string;
32
+ name: string;
33
+ email: string;
34
+ } | null;
35
+ message: string | null;
36
+ expected_users: number | null;
37
+ /** Seats the license holds today. */
38
+ users_now: number | null;
39
+ response_message: string | null;
40
+ responded_by: {
41
+ id: string;
42
+ name: string;
43
+ } | null;
44
+ responded_at: string | null;
45
+ created_at: string | null;
46
+ updated_at: string | null;
47
+ }
48
+ /** `POST /licenses/{id}/plan-requests` body: a reseller from `resellers.list()`. */
49
+ export interface RequestProData {
50
+ reseller_license_id: string;
51
+ message?: string;
52
+ expected_users?: number;
53
+ }
54
+ /** `POST /plan-requests/{id}/approve` body. */
55
+ export interface ApprovePlanRequestData {
56
+ response_message?: string;
57
+ }
58
+ /** `POST /plan-requests/{id}/decline` body: the reason is mandatory. */
59
+ export interface DeclinePlanRequestData {
60
+ response_message: string;
61
+ }
62
+ /** `POST /licenses/{id}/upgrade-nudge` body: the limit the member ran into, when known. */
63
+ export interface UpgradeNudgeData {
64
+ quota?: LicenseLimitKey;
65
+ }
66
+ /** A license as its reseller sees it (`GET /licenses/{id}/reseller/customers`). No prices. */
67
+ export interface ResellerCustomer {
68
+ id: string;
69
+ name: string;
70
+ primary_domain: string | null;
71
+ plan: 'free' | 'pro';
72
+ /** When access was suspended; null while it is on. */
73
+ access_revoked_at: string | null;
74
+ /** `users` count against the limit, sponsored and pro_elsewhere included; billed on Pro = users - pro_elsewhere. */
75
+ seats: {
76
+ users: number;
77
+ guests: number;
78
+ sponsored: number;
79
+ pro_elsewhere: number;
80
+ };
81
+ /** Bytes used and the effective limit (null = unlimited or not measured yet). */
82
+ usage: Record<'dms_storage_bytes' | 'table_db_bytes', {
83
+ usage: number | null;
84
+ limit: number | null;
85
+ }>;
86
+ admin_contact: {
87
+ name: string;
88
+ email: string;
89
+ } | null;
90
+ plan_changed_at: string | null;
91
+ }
92
+ /** `POST /licenses/{id}/revoke-access` body. */
93
+ export interface RevokeAccessData {
94
+ reason?: string;
95
+ }
96
+ /** The 403 body on every request into a suspended license (`LICENSE_ACCESS_REVOKED`), reads included. */
97
+ export interface LicenseAccessRevokedError {
98
+ error: 'LICENSE_ACCESS_REVOKED';
99
+ message: string;
100
+ details: {
101
+ license_id: string;
102
+ license_name: string;
103
+ revoked_at: string | null;
104
+ /** Whom to contact to restore access. */
105
+ reseller: (LicenseResellerRef & {
106
+ contact_email: string | null;
107
+ }) | null;
108
+ };
109
+ }
110
+ /** True when an error response body is a `LicenseAccessRevokedError`; `reseller` is null or complete. */
111
+ export declare function isLicenseAccessRevokedError(error: unknown): error is LicenseAccessRevokedError;
112
+ //# sourceMappingURL=ResellerService.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ResellerService.types.d.ts","sourceRoot":"","sources":["../../src/services/ResellerService.types.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AAE7D,2EAA2E;AAC3E,MAAM,WAAW,kBAAkB;IACjC,UAAU,EAAE,MAAM,CAAA;IAClB,IAAI,EAAE,MAAM,CAAA;CACb;AAED,mGAAmG;AACnG,MAAM,WAAW,eAAgB,SAAQ,kBAAkB;IACzD,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,4DAA4D;IAC5D,aAAa,EAAE,MAAM,GAAG,IAAI,CAAA;CAC7B;AAED,oGAAoG;AACpG,MAAM,MAAM,wBAAwB,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,GAAG,WAAW,CAAA;AAExF,qDAAq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AAI,yBAAyB,CAW9F"}
@@ -0,0 +1,22 @@
1
+ // Resellers (AAD-1154): a reseller is a license marked in `reseller_profiles`, and its look is
2
+ // its publisher identity. Mirrors `GET /license-resellers`, the `reseller` field of a license
3
+ // and the Pro-request routes.
4
+ function isRecord(value) {
5
+ return typeof value === 'object' && value !== null;
6
+ }
7
+ function isStringOrNull(value) {
8
+ return value === null || typeof value === 'string';
9
+ }
10
+ /** True when an error response body is a `LicenseAccessRevokedError`; `reseller` is null or complete. */
11
+ export function isLicenseAccessRevokedError(error) {
12
+ if (!isRecord(error) || error.error !== 'LICENSE_ACCESS_REVOKED' || typeof error.message !== 'string')
13
+ return false;
14
+ const { details } = error;
15
+ if (!isRecord(details) || typeof details.license_id !== 'string' || typeof details.license_name !== 'string'
16
+ || !isStringOrNull(details.revoked_at)) {
17
+ return false;
18
+ }
19
+ const { reseller } = details;
20
+ return reseller === null || (isRecord(reseller) && typeof reseller.license_id === 'string'
21
+ && typeof reseller.name === 'string' && isStringOrNull(reseller.contact_email));
22
+ }
@@ -17,15 +17,7 @@ export interface ScriptsService {
17
17
  }) => Promise<Script>;
18
18
  publish: (script: string, project: string) => Promise<ScriptItem>;
19
19
  publications: (script: string, project: string) => Promise<PublicationScript[]>;
20
- /**
21
- * Start a debug run for the given script. The script engine streams stdout / stderr / log
22
- * events over the broadcasting channel `App.Script.{script_id}.Debug.{session_id}`
23
- * during execution. Clients should subscribe to that channel before — or right after —
24
- * calling this endpoint to avoid missing the initial output.
25
- *
26
- * Pass `python_version` (e.g. `'3.11'`) to run the debug session on a specific
27
- * interpreter; omitted, the engine falls back to its default version.
28
- */
20
+ /** Streams over the returned `channel` (subscribe at once); a `private-` one needs `broadcasting.auth()` first. */
29
21
  debug: (script: string, options?: ScriptDebugOptions) => Promise<ScriptDebugSession>;
30
22
  }
31
23
  export declare function newScriptsService(client: AntHttpClient): ScriptsService;
@@ -37,6 +29,8 @@ export interface ScriptDebugSession {
37
29
  message: string;
38
30
  session_id: string;
39
31
  script_id: string;
32
+ /** `[private-]App.Script.{script_id}.Debug.{session_id}`; absent on older backends (public name). */
33
+ channel?: string;
40
34
  }
41
35
  export interface ScriptItem {
42
36
  id: string;
@@ -1 +1 @@
1
- {"version":3,"file":"ScriptsService.d.ts","sourceRoot":"","sources":["../../src/services/ScriptsService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,yBAAuB;AAEpD,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,UAAU,EAAE,CAAC,CAAA;IAClD,4BAA4B,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAAA;IAC/E,GAAG,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;IACxC,MAAM,EAAE,CAAC,MAAM,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;IACtE,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IACtE,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;IAC1G,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,UAAU,CAAC,CAAA;IACjE,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,iBAAiB,EAAE,CAAC,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CACxB;AAED,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,CAAA;IACf,UAAU,EAAE,MAAM,CAAA;IAClB,SAAS,EAAE,MAAM,CAAA;IACjB,qGAAqG;IACrG,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,YAAY,EAAE,MAAM,CAAA;IACpB,UAAU,EAAE,OAAO,CAAA;IACnB,UAAU,EAAE,IAAI,CAAA;CACjB;AAED,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAA;IACV,OAAO,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,MAAO,SAAQ,UAAU;IACxC,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,aAAa,EAAE,CAAA;CAC1B;AAED,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAA;IACV,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,MAAM,CAAA;IAClB,KAAK,EAAE;QACL,UAAU,EAAE,MAAM,CAAA;QAClB,SAAS,EAAE,MAAM,CAAA;KAClB,CAAA;CACF;AAED,eAAe,cAAc,CAAA"}
@@ -77,7 +77,13 @@ export type DatasetRefusalReason = 'invalid_payload_config' | 'byte_limit_exceed
77
77
  * The string still says `snapshot` deliberately: it is persisted in existing
78
78
  * rows, and changing it would break reading them.
79
79
  */
80
- | 'snapshot_limits_misconfigured' | 'internal_error';
80
+ | 'snapshot_limits_misconfigured' | 'internal_error'
81
+ /** The script's input exceeds the engine ceiling (413); the script was not run. */
82
+ | 'script_input_too_large'
83
+ /** Every engine replica was busy for the whole retry budget (503); temporary, safe to retry. */
84
+ | 'script_engine_busy'
85
+ /** The script ran and failed (502); the publisher's detail is on the history row only. */
86
+ | 'script_failed';
81
87
  /**
82
88
  * Every refusal reason, as a runtime lookup.
83
89
  *
@@ -100,16 +106,16 @@ export interface DatasetReleaseRefusal {
100
106
  status_code: 422;
101
107
  }
102
108
  /**
103
- * A dataset action refused to serve.
109
+ * A dataset action refused to serve. comment-budget: allow (pre-existing contract record)
104
110
  *
105
111
  * ⚠️ Arrives as a NON-2xx response, so it surfaces as a rejected request — read it
106
112
  * off the error body, not the resolved value. It sits inside the dispatch
107
113
  * envelope: `error.response.data.response`.
108
114
  *
109
- * **Branch on `reason`, never on the HTTP status.** There are only two statuses —
110
- * 422 for anything the publisher or the data is responsible for, 5xx for
111
- * `snapshot_limits_misconfigured` and `internal_error` — so the status cannot tell
112
- * you what to say.
115
+ * **Branch on `reason`, never on the HTTP status.** 422 covers anything the
116
+ * publisher or the data is responsible for, 5xx `snapshot_limits_misconfigured`
117
+ * and `internal_error`, 413 `script_input_too_large`, 502 `script_failed`,
118
+ * 503 `script_engine_busy` — so the status cannot tell you what to say.
113
119
  *
114
120
  * `message` is a caller-safe sentence. The detailed one, which names columns and
115
121
  * table ids, is deliberately withheld and only reaches the execution history the
@@ -1 +1 @@
1
- {"version":3,"file":"TriggerDatasetResponses.types.d.ts","sourceRoot":"","sources":["../../../src/services/Trigger/TriggerDatasetResponses.types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,yCAAyC;AACzC,MAAM,WAAW,WAAW;IAC1B,4DAA4D;IAC5D,IAAI,EAAE,MAAM,EAAE,CAAA;IACd,yFAAyF;IACzF,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAA;IACpC,8DAA8D;IAC9D,SAAS,EAAE,MAAM,CAAA;IACjB;;;;;;OAMG;IACH,SAAS,EAAE,OAAO,CAAA;IAClB,kDAAkD;IAClD,KAAK,EAAE,MAAM,CAAA;IACb,+BAA+B;IAC/B,MAAM,EAAE,MAAM,CAAA;IACd,iGAAiG;IACjG,WAAW,EAAE,MAAM,GAAG,IAAI,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f,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAChC,WAAW,EAAE,GAAG,CAAA;CACjB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,WAAW,oBAAoB;IACnC,eAAe,EAAE,IAAI,CAAA;IACrB,MAAM,EAAE,oBAAoB,CAAA;IAC5B,OAAO,EAAE,MAAM,CAAA;IACf,0CAA0C;IAC1C,WAAW,EAAE,MAAM,CAAA;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,IAAI,oBAAoB,CAQhF;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,WAAW,CAKxE;AAED,0DAA0D;AAC1D,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,IAAI,oBAAoB,CAOnF;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,oBAAoB,GAAG,OAAO,CAErE"}
1
+ {"version":3,"file":"TriggerDatasetResponses.types.d.ts","sourceRoot":"","sources":["../../../src/services/Trigger/TriggerDatasetResponses.types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,yCAAyC;AACzC,MAAM,WAAW,WAAW;IAC1B,4DAA4D;IAC5D,IAAI,EAAE,MAAM,EAAE,CAAA;IACd,yFAAyF;IACzF,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAA;IACpC,8DAA8D;IAC9D,SAAS,EAAE,MAAM,CAAA;IACjB;;;;;;OAMG;IACH,SAAS,EAAE,OAAO,CAAA;IAClB,kDAAkD;IAClD,KAAK,EAAE,MAAM,CAAA;IACb,+BAA+B;IAC/B,MAAM,EAAE,MAAM,CAAA;IACd,iGAAiG;IACjG,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA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AAE,IAAI,CAAA;IACrB,MAAM,EAAE,oBAAoB,CAAA;IAC5B,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAChC,WAAW,EAAE,GAAG,CAAA;CACjB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,WAAW,oBAAoB;IACnC,eAAe,EAAE,IAAI,CAAA;IACrB,MAAM,EAAE,oBAAoB,CAAA;IAC5B,OAAO,EAAE,MAAM,CAAA;IACf,0CAA0C;IAC1C,WAAW,EAAE,MAAM,CAAA;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,IAAI,oBAAoB,CAQhF;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,WAAW,CAKxE;AAED,0DAA0D;AAC1D,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,IAAI,oBAAoB,CAOnF;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,oBAAoB,GAAG,OAAO,CAErE"}
@@ -26,6 +26,9 @@ export const DATASET_REFUSAL_REASONS = {
26
26
  unpublishable_column_type: true,
27
27
  snapshot_limits_misconfigured: true,
28
28
  internal_error: true,
29
+ script_input_too_large: true,
30
+ script_engine_busy: true,
31
+ script_failed: true,
29
32
  };
30
33
  /**
31
34
  * Type guard: is this a refused dataset dispatch?