@burdenoff/sdk-libs 2026.719.1 → 2026.722.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.
- package/dist/chunk-Q2R2HBZ7.js +2 -0
- package/dist/core/index.cjs +2 -2
- package/dist/core/index.d.cts +2 -2
- package/dist/core/index.d.ts +2 -2
- package/dist/core/index.js +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/{module-JDbvil5h.d.cts → module-CTWrNzF5.d.cts} +2 -2
- package/dist/{module-JDbvil5h.d.ts → module-CTWrNzF5.d.ts} +2 -2
- package/dist/modules/adaptercloud/index.d.cts +1 -1
- package/dist/modules/adaptercloud/index.d.ts +1 -1
- package/dist/modules/artistrybase/index.d.cts +1 -1
- package/dist/modules/artistrybase/index.d.ts +1 -1
- package/dist/modules/assethandler/index.d.cts +1 -1
- package/dist/modules/assethandler/index.d.ts +1 -1
- package/dist/modules/atheletebridge/index.d.cts +1 -1
- package/dist/modules/atheletebridge/index.d.ts +1 -1
- package/dist/modules/auth/index.d.cts +1 -1
- package/dist/modules/auth/index.d.ts +1 -1
- package/dist/modules/billing/index.d.cts +1 -1
- package/dist/modules/billing/index.d.ts +1 -1
- package/dist/modules/brainyrich/index.d.cts +1 -1
- package/dist/modules/brainyrich/index.d.ts +1 -1
- package/dist/modules/buildmyiq/index.d.cts +1 -1
- package/dist/modules/buildmyiq/index.d.ts +1 -1
- package/dist/modules/channels/index.d.cts +1 -1
- package/dist/modules/channels/index.d.ts +1 -1
- package/dist/modules/collabkin/index.d.cts +1 -1
- package/dist/modules/collabkin/index.d.ts +1 -1
- package/dist/modules/comradecircle/index.d.cts +1 -1
- package/dist/modules/comradecircle/index.d.ts +1 -1
- package/dist/modules/conversations/index.d.cts +1 -1
- package/dist/modules/conversations/index.d.ts +1 -1
- package/dist/modules/coolandlovely/index.d.cts +1 -1
- package/dist/modules/coolandlovely/index.d.ts +1 -1
- package/dist/modules/cosmicintersection/index.d.cts +1 -1
- package/dist/modules/cosmicintersection/index.d.ts +1 -1
- package/dist/modules/crewfoundry/index.d.cts +1 -1
- package/dist/modules/crewfoundry/index.d.ts +1 -1
- package/dist/modules/devportal/index.d.cts +1 -1
- package/dist/modules/devportal/index.d.ts +1 -1
- package/dist/modules/ecoimpacthub/index.d.cts +1 -1
- package/dist/modules/ecoimpacthub/index.d.ts +1 -1
- package/dist/modules/eventfullymanaged/index.d.cts +1 -1
- package/dist/modules/eventfullymanaged/index.d.ts +1 -1
- package/dist/modules/export/index.d.cts +1 -1
- package/dist/modules/export/index.d.ts +1 -1
- package/dist/modules/files/index.d.cts +1 -1
- package/dist/modules/files/index.d.ts +1 -1
- package/dist/modules/ggnomad/index.d.cts +1 -1
- package/dist/modules/ggnomad/index.d.ts +1 -1
- package/dist/modules/govcitizenhub/index.d.cts +1 -1
- package/dist/modules/govcitizenhub/index.d.ts +1 -1
- package/dist/modules/groups/index.d.cts +1 -1
- package/dist/modules/groups/index.d.ts +1 -1
- package/dist/modules/headshotmarketing/index.d.cts +1 -1
- package/dist/modules/headshotmarketing/index.d.ts +1 -1
- package/dist/modules/health/index.d.cts +1 -1
- package/dist/modules/health/index.d.ts +1 -1
- package/dist/modules/hookmovies/index.d.cts +1 -1
- package/dist/modules/hookmovies/index.d.ts +1 -1
- package/dist/modules/housingvista/index.d.cts +1 -1
- package/dist/modules/housingvista/index.d.ts +1 -1
- package/dist/modules/integrations/index.d.cts +1 -1
- package/dist/modules/integrations/index.d.ts +1 -1
- package/dist/modules/intelwatchtower/index.d.cts +1 -1
- package/dist/modules/intelwatchtower/index.d.ts +1 -1
- package/dist/modules/kadaikodi/index.d.cts +1 -1
- package/dist/modules/kadaikodi/index.d.ts +1 -1
- package/dist/modules/labsofscience/index.d.cts +1 -1
- package/dist/modules/labsofscience/index.d.ts +1 -1
- package/dist/modules/manufacturedops/index.d.cts +1 -1
- package/dist/modules/manufacturedops/index.d.ts +1 -1
- package/dist/modules/movethewheels/index.d.cts +1 -1
- package/dist/modules/movethewheels/index.d.ts +1 -1
- package/dist/modules/mybodyshield/index.d.cts +1 -1
- package/dist/modules/mybodyshield/index.d.ts +1 -1
- package/dist/modules/notifications/index.d.cts +1 -1
- package/dist/modules/notifications/index.d.ts +1 -1
- package/dist/modules/organizations/index.d.cts +1 -1
- package/dist/modules/organizations/index.d.ts +1 -1
- package/dist/modules/planmagnet/index.d.cts +1 -1
- package/dist/modules/planmagnet/index.d.ts +1 -1
- package/dist/modules/products/index.d.cts +1 -1
- package/dist/modules/products/index.d.ts +1 -1
- package/dist/modules/proserviceworld/index.d.cts +1 -1
- package/dist/modules/proserviceworld/index.d.ts +1 -1
- package/dist/modules/rbac/index.d.cts +1 -1
- package/dist/modules/rbac/index.d.ts +1 -1
- package/dist/modules/sandbox/index.d.cts +1 -1
- package/dist/modules/sandbox/index.d.ts +1 -1
- package/dist/modules/scheduler/index.d.cts +1 -1
- package/dist/modules/scheduler/index.d.ts +1 -1
- package/dist/modules/security/index.d.cts +1 -1
- package/dist/modules/security/index.d.ts +1 -1
- package/dist/modules/semanticfed/index.d.cts +1 -1
- package/dist/modules/semanticfed/index.d.ts +1 -1
- package/dist/modules/store/index.d.cts +1 -1
- package/dist/modules/store/index.d.ts +1 -1
- package/dist/modules/subscriberbot/index.d.cts +1 -1
- package/dist/modules/subscriberbot/index.d.ts +1 -1
- package/dist/modules/support/index.d.cts +1 -1
- package/dist/modules/support/index.d.ts +1 -1
- package/dist/modules/tags/index.d.cts +1 -1
- package/dist/modules/tags/index.d.ts +1 -1
- package/dist/modules/technospam/index.d.cts +1 -1
- package/dist/modules/technospam/index.d.ts +1 -1
- package/dist/modules/theculturepost/index.d.cts +1 -1
- package/dist/modules/theculturepost/index.d.ts +1 -1
- package/dist/modules/theglobalfuel/index.d.cts +1 -1
- package/dist/modules/theglobalfuel/index.d.ts +1 -1
- package/dist/modules/timecampus/index.d.cts +1 -1
- package/dist/modules/timecampus/index.d.ts +1 -1
- package/dist/modules/tours/index.d.cts +1 -1
- package/dist/modules/tours/index.d.ts +1 -1
- package/dist/modules/vibecontrols/index.d.cts +1 -1
- package/dist/modules/vibecontrols/index.d.ts +1 -1
- package/dist/modules/workspaces/index.d.cts +1 -1
- package/dist/modules/workspaces/index.d.ts +1 -1
- package/package.json +1 -1
- package/dist/chunk-YGVAZ3D7.js +0 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { J as Json, S as SdkModule } from '../../module-
|
|
1
|
+
import { J as Json, S as SdkModule } from '../../module-CTWrNzF5.cjs';
|
|
2
2
|
import 'graphql-request';
|
|
3
3
|
|
|
4
4
|
type HokApplicationStatus = 'CALLBACK' | 'OFFERED' | 'REJECTED' | 'SHORTLISTED' | 'SUBMITTED' | 'WITHDRAWN';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { J as Json, S as SdkModule } from '../../module-
|
|
1
|
+
import { J as Json, S as SdkModule } from '../../module-CTWrNzF5.js';
|
|
2
2
|
import 'graphql-request';
|
|
3
3
|
|
|
4
4
|
type HokApplicationStatus = 'CALLBACK' | 'OFFERED' | 'REJECTED' | 'SHORTLISTED' | 'SUBMITTED' | 'WITHDRAWN';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { J as Json, S as SdkModule } from '../../module-
|
|
1
|
+
import { J as Json, S as SdkModule } from '../../module-CTWrNzF5.cjs';
|
|
2
2
|
import 'graphql-request';
|
|
3
3
|
|
|
4
4
|
type HousingvistaPropertyStatus = 'for_rent' | 'for_sale' | 'off_market' | 'rented' | 'sold' | 'under_contract';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { J as Json, S as SdkModule } from '../../module-
|
|
1
|
+
import { J as Json, S as SdkModule } from '../../module-CTWrNzF5.js';
|
|
2
2
|
import 'graphql-request';
|
|
3
3
|
|
|
4
4
|
type HousingvistaPropertyStatus = 'for_rent' | 'for_sale' | 'off_market' | 'rented' | 'sold' | 'under_contract';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { J as Json, S as SdkModule } from '../../module-
|
|
1
|
+
import { J as Json, S as SdkModule } from '../../module-CTWrNzF5.cjs';
|
|
2
2
|
import 'graphql-request';
|
|
3
3
|
|
|
4
4
|
type ProviderCategory = 'ANALYTICS' | 'CALENDAR' | 'CLOUD_STORAGE' | 'COMMUNICATION' | 'CRM' | 'CUSTOM' | 'DEVELOPMENT' | 'EMAIL' | 'PAYMENT' | 'PRODUCTIVITY' | 'SOCIAL';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { J as Json, S as SdkModule } from '../../module-
|
|
1
|
+
import { J as Json, S as SdkModule } from '../../module-CTWrNzF5.js';
|
|
2
2
|
import 'graphql-request';
|
|
3
3
|
|
|
4
4
|
type ProviderCategory = 'ANALYTICS' | 'CALENDAR' | 'CLOUD_STORAGE' | 'COMMUNICATION' | 'CRM' | 'CUSTOM' | 'DEVELOPMENT' | 'EMAIL' | 'PAYMENT' | 'PRODUCTIVITY' | 'SOCIAL';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { J as Json, S as SdkModule } from '../../module-
|
|
1
|
+
import { J as Json, S as SdkModule } from '../../module-CTWrNzF5.cjs';
|
|
2
2
|
import 'graphql-request';
|
|
3
3
|
|
|
4
4
|
type MovethewheelsDriverStatus = 'AVAILABLE' | 'INACTIVE' | 'OFF_DUTY' | 'ON_BREAK' | 'ON_DELIVERY';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { J as Json, S as SdkModule } from '../../module-
|
|
1
|
+
import { J as Json, S as SdkModule } from '../../module-CTWrNzF5.js';
|
|
2
2
|
import 'graphql-request';
|
|
3
3
|
|
|
4
4
|
type MovethewheelsDriverStatus = 'AVAILABLE' | 'INACTIVE' | 'OFF_DUTY' | 'ON_BREAK' | 'ON_DELIVERY';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { J as Json, S as SdkModule } from '../../module-
|
|
1
|
+
import { J as Json, S as SdkModule } from '../../module-CTWrNzF5.cjs';
|
|
2
2
|
import 'graphql-request';
|
|
3
3
|
|
|
4
4
|
type NotificationChannel = 'DISCORD' | 'EMAIL' | 'IN_APP' | 'PUSH' | 'SLACK' | 'SMS' | 'TEAMS' | 'TELEGRAM' | 'WEBHOOK' | 'WHATSAPP';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { J as Json, S as SdkModule } from '../../module-
|
|
1
|
+
import { J as Json, S as SdkModule } from '../../module-CTWrNzF5.js';
|
|
2
2
|
import 'graphql-request';
|
|
3
3
|
|
|
4
4
|
type NotificationChannel = 'DISCORD' | 'EMAIL' | 'IN_APP' | 'PUSH' | 'SLACK' | 'SMS' | 'TEAMS' | 'TELEGRAM' | 'WEBHOOK' | 'WHATSAPP';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { J as Json, S as SdkModule } from '../../module-
|
|
1
|
+
import { J as Json, S as SdkModule } from '../../module-CTWrNzF5.cjs';
|
|
2
2
|
import 'graphql-request';
|
|
3
3
|
|
|
4
4
|
type PlanmagnetAutomationExecutionStatus = 'FAILURE' | 'PENDING' | 'RUNNING' | 'SKIPPED' | 'SUCCESS';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { J as Json, S as SdkModule } from '../../module-
|
|
1
|
+
import { J as Json, S as SdkModule } from '../../module-CTWrNzF5.js';
|
|
2
2
|
import 'graphql-request';
|
|
3
3
|
|
|
4
4
|
type PlanmagnetAutomationExecutionStatus = 'FAILURE' | 'PENDING' | 'RUNNING' | 'SKIPPED' | 'SUCCESS';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { J as Json, P as PaginationInput, S as SdkModule } from '../../module-
|
|
1
|
+
import { J as Json, P as PaginationInput, S as SdkModule } from '../../module-CTWrNzF5.cjs';
|
|
2
2
|
import 'graphql-request';
|
|
3
3
|
|
|
4
4
|
type ActorType = 'user' | 'app' | 'service' | 'super_admin';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { J as Json, P as PaginationInput, S as SdkModule } from '../../module-
|
|
1
|
+
import { J as Json, P as PaginationInput, S as SdkModule } from '../../module-CTWrNzF5.js';
|
|
2
2
|
import 'graphql-request';
|
|
3
3
|
|
|
4
4
|
type ActorType = 'user' | 'app' | 'service' | 'super_admin';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { J as Json, S as SdkModule } from '../../module-
|
|
1
|
+
import { J as Json, S as SdkModule } from '../../module-CTWrNzF5.cjs';
|
|
2
2
|
import 'graphql-request';
|
|
3
3
|
|
|
4
4
|
type SandboxTemplate = 'AI_BUILDER' | 'WORKFLOW_MULTI_NODE' | 'MISC_SHELL' | 'CUSTOM' | 'VIBECONTROLS';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { J as Json, S as SdkModule } from '../../module-
|
|
1
|
+
import { J as Json, S as SdkModule } from '../../module-CTWrNzF5.js';
|
|
2
2
|
import 'graphql-request';
|
|
3
3
|
|
|
4
4
|
type SandboxTemplate = 'AI_BUILDER' | 'WORKFLOW_MULTI_NODE' | 'MISC_SHELL' | 'CUSTOM' | 'VIBECONTROLS';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { J as Json, S as SdkModule } from '../../module-
|
|
1
|
+
import { J as Json, S as SdkModule } from '../../module-CTWrNzF5.cjs';
|
|
2
2
|
import 'graphql-request';
|
|
3
3
|
|
|
4
4
|
type JobStatus = 'ACTIVE' | 'ARCHIVED' | 'DISABLED' | 'ERROR' | 'PAUSED' | 'PENDING' | 'RUNNING';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { J as Json, S as SdkModule } from '../../module-
|
|
1
|
+
import { J as Json, S as SdkModule } from '../../module-CTWrNzF5.cjs';
|
|
2
2
|
import 'graphql-request';
|
|
3
3
|
|
|
4
4
|
type SemAggregation = 'AVG' | 'COUNT' | 'COUNT_DISTINCT' | 'CUSTOM' | 'MAX' | 'MEDIAN' | 'MIN' | 'SUM';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { J as Json, S as SdkModule } from '../../module-
|
|
1
|
+
import { J as Json, S as SdkModule } from '../../module-CTWrNzF5.js';
|
|
2
2
|
import 'graphql-request';
|
|
3
3
|
|
|
4
4
|
type SemAggregation = 'AVG' | 'COUNT' | 'COUNT_DISTINCT' | 'CUSTOM' | 'MAX' | 'MEDIAN' | 'MIN' | 'SUM';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { J as Json, S as SdkModule } from '../../module-
|
|
1
|
+
import { J as Json, S as SdkModule } from '../../module-CTWrNzF5.cjs';
|
|
2
2
|
import 'graphql-request';
|
|
3
3
|
|
|
4
4
|
type StoreProductType = 'APP' | 'INTEGRATION' | 'TEMPLATE' | 'EXTENSION' | 'NODE' | 'WIDGET' | 'AGENT' | 'BUNDLE' | 'PRODUCT' | 'PROMPT' | 'WORKFLOW' | 'THEME';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { J as Json, S as SdkModule } from '../../module-
|
|
1
|
+
import { J as Json, S as SdkModule } from '../../module-CTWrNzF5.js';
|
|
2
2
|
import 'graphql-request';
|
|
3
3
|
|
|
4
4
|
type StoreProductType = 'APP' | 'INTEGRATION' | 'TEMPLATE' | 'EXTENSION' | 'NODE' | 'WIDGET' | 'AGENT' | 'BUNDLE' | 'PRODUCT' | 'PROMPT' | 'WORKFLOW' | 'THEME';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { J as Json, S as SdkModule } from '../../module-
|
|
1
|
+
import { J as Json, S as SdkModule } from '../../module-CTWrNzF5.cjs';
|
|
2
2
|
import 'graphql-request';
|
|
3
3
|
|
|
4
4
|
type SubAgentKind = 'COMPLIANCE' | 'CONCIERGE' | 'COST' | 'DISCOVERY' | 'MIGRATION' | 'NEGOTIATION' | 'NEWSLETTER' | 'RENEWAL' | 'VENDOR';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { J as Json, S as SdkModule } from '../../module-
|
|
1
|
+
import { J as Json, S as SdkModule } from '../../module-CTWrNzF5.js';
|
|
2
2
|
import 'graphql-request';
|
|
3
3
|
|
|
4
4
|
type SubAgentKind = 'COMPLIANCE' | 'CONCIERGE' | 'COST' | 'DISCOVERY' | 'MIGRATION' | 'NEGOTIATION' | 'NEWSLETTER' | 'RENEWAL' | 'VENDOR';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { J as Json, S as SdkModule } from '../../module-
|
|
1
|
+
import { J as Json, S as SdkModule } from '../../module-CTWrNzF5.cjs';
|
|
2
2
|
import 'graphql-request';
|
|
3
3
|
|
|
4
4
|
type SupportTicketStatus = 'CLOSED' | 'IN_PROGRESS' | 'NEW' | 'REOPENED' | 'RESOLVED' | 'WAITING_CUSTOMER';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { J as Json, S as SdkModule } from '../../module-
|
|
1
|
+
import { J as Json, S as SdkModule } from '../../module-CTWrNzF5.js';
|
|
2
2
|
import 'graphql-request';
|
|
3
3
|
|
|
4
4
|
type SupportTicketStatus = 'CLOSED' | 'IN_PROGRESS' | 'NEW' | 'REOPENED' | 'RESOLVED' | 'WAITING_CUSTOMER';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as ContextInput, J as Json, P as PaginationInput, S as SdkModule } from '../../module-
|
|
1
|
+
import { C as ContextInput, J as Json, P as PaginationInput, S as SdkModule } from '../../module-CTWrNzF5.cjs';
|
|
2
2
|
import 'graphql-request';
|
|
3
3
|
|
|
4
4
|
type TagScope = 'GLOBAL' | 'TENANT' | 'WORKSPACE' | 'PRIVATE';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as ContextInput, J as Json, P as PaginationInput, S as SdkModule } from '../../module-
|
|
1
|
+
import { C as ContextInput, J as Json, P as PaginationInput, S as SdkModule } from '../../module-CTWrNzF5.js';
|
|
2
2
|
import 'graphql-request';
|
|
3
3
|
|
|
4
4
|
type TagScope = 'GLOBAL' | 'TENANT' | 'WORKSPACE' | 'PRIVATE';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { J as Json, P as PaginationInput, S as SdkModule } from '../../module-
|
|
1
|
+
import { J as Json, P as PaginationInput, S as SdkModule } from '../../module-CTWrNzF5.cjs';
|
|
2
2
|
import 'graphql-request';
|
|
3
3
|
|
|
4
4
|
type WorkspaceStatus = 'ACTIVE' | 'ARCHIVED' | 'DELETED' | 'SUSPENDED';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { J as Json, P as PaginationInput, S as SdkModule } from '../../module-
|
|
1
|
+
import { J as Json, P as PaginationInput, S as SdkModule } from '../../module-CTWrNzF5.js';
|
|
2
2
|
import 'graphql-request';
|
|
3
3
|
|
|
4
4
|
type WorkspaceStatus = 'ACTIVE' | 'ARCHIVED' | 'DELETED' | 'SUSPENDED';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@burdenoff/sdk-libs",
|
|
3
|
-
"version": "2026.
|
|
3
|
+
"version": "2026.722.1",
|
|
4
4
|
"description": "Modular SDK library shared across all Burdenoff product SDKs (vibecontrols, botlit, fluidgrids, bigconsole, healthybowl, devportal, workspaces). Each module exports an SdkModule contract with attach(ctx) returning a typed API; product SDKs become thin shells that pick which modules to mount. Sister to @burdenoff/cli-sdk.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
package/dist/chunk-YGVAZ3D7.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import {c,b as b$1,g as g$1,d,e,a,l,j as j$1,k}from'./chunk-NEREAHJ6.js';import {GraphQLClient}from'graphql-request';import {readFile,mkdir,writeFile,unlink}from'fs/promises';import {dirname}from'path';var $=3e4,D=3,B=1e3,j=300*1e3;function Q(t,e){return new Promise((r,o)=>{if(e?.aborted)return o(new b$1("Aborted","ABORTED"));let n=setTimeout(()=>r(),t);e?.addEventListener("abort",()=>{clearTimeout(n),o(new b$1("Aborted","ABORTED"));});})}function U(t){if(t instanceof TypeError)return true;if(t&&typeof t=="object"&&"response"in t){let e=t.response;if(e&&typeof e.status=="number"&&e.status>=500)return true}return false}function K(t){if(t&&typeof t=="object"&&"response"in t){let e=t.response;if(e&&typeof e.status=="number"&&e.status>=400&&e.status<500)return e.status}return null}function M(t){if(t&&typeof t=="object"&&"response"in t){let e=t,r=e.response?.errors?.[0];if(r?.message)return a(r.message);if(e.message)return a(e.message)}return t instanceof Error?a(t.message):a(String(t))}var h=class{workspaceClient;globalClient;opts;constructor(e){this.opts=e,this.workspaceClient=new GraphQLClient(e.workspaceEndpoint),this.globalClient=new GraphQLClient(e.globalEndpoint);}async buildHeaders(e){let r={},o=this.opts.auth.getApiKey();o&&(r["X-API-Key"]=o);let n=await this.opts.auth.getTokens();if(n?.accessToken&&(r.Authorization=`Bearer ${n.accessToken}`),e==="workspace"){let s=this.opts.auth.getWorkspaceToken();s&&(r["X-Workspace-Authorization"]=`Bearer ${s}`);}return r}isExpiringSoon(e){return e?Date.now()+j>=e:false}async ensureFresh(){if(this.opts.autoRefresh===false)return;let e=await this.opts.auth.getTokens();e?.expiresAt&&this.isExpiringSoon(e.expiresAt)&&await this.performTokenRefresh();}async performTokenRefresh(){let e=await this.opts.auth.getTokens();if(!e?.refreshToken)throw new c("No refresh token available");let o=await this.globalClient.request("mutation RefreshToken($token: String!) { refreshToken(token: $token) { accessToken refreshToken expiresIn } }",{token:e.refreshToken}),n=Date.now()+o.refreshToken.expiresIn*1e3,s={accessToken:o.refreshToken.accessToken,refreshToken:o.refreshToken.refreshToken,expiresAt:n};return await this.opts.auth.setTokens(s),this.opts.onTokenRefresh&&await this.opts.onTokenRefresh(s),s}async executeWithRetry(e$1,r,o,n,s){let i=this.opts.timeout??$,a;for(let u=0;u<D;u++){let x=new AbortController,E=s?.signal??this.opts.defaultSignal,G=()=>x.abort();E?.addEventListener("abort",G);let F=setTimeout(()=>x.abort(),i);try{let f=await this.buildHeaders(r);return await e$1.request({document:o,variables:n,signal:x.signal,requestHeaders:f})}catch(f){if(a=f,K(f)!==null)break;if(U(f)&&u<D-1){await Q(B*2**u,E);continue}break}finally{clearTimeout(F),E?.removeEventListener("abort",G);}}let l=K(a);if(l!==null){let u=M(a);switch(l){case 401:throw new c(u,a);case 403:throw new d(u,a);case 429:throw new g$1(u,a);default:throw new b$1(u,`HTTP_${l}`,a)}}throw a instanceof TypeError?new e(M(a),a):a instanceof b$1?a:new b$1(M(a),"SDK_ERROR",a)}async globalRequest(e,r,o){return this.executeWithRetry(this.globalClient,"global",e,r,o)}async workspaceRequest(e,r,o){return await this.ensureFresh(),this.executeWithRetry(this.workspaceClient,"workspace",e,r,o)}async workspaceAuthOnlyRequest(e,r,o){return this.executeWithRetry(this.workspaceClient,"workspace",e,r,o)}};function m(t,e){return e==="workspace"?{request:(r,o,n)=>t.workspaceRequest(r,o,n)}:e==="global"?{request:(r,o,n)=>t.globalRequest(r,o,n)}:{request:(r,o,n)=>t.workspaceAuthOnlyRequest(r,o,n)}}var g=class{tokens;constructor(e){this.tokens=e??null;}async get(){return this.tokens?{...this.tokens}:null}async set(e){this.tokens={...e};}async clear(){this.tokens=null;}},S=class{constructor(e){this.opts=e;}opts;async get(){try{let e=await readFile(this.opts.path,"utf8"),r=JSON.parse(e);return r&&typeof r.accessToken=="string"?{accessToken:r.accessToken,refreshToken:r.refreshToken??"",expiresAt:typeof r.expiresAt=="number"?r.expiresAt:void 0}:null}catch(e){if(V(e)==="ENOENT")return null;throw new Error(a(`FileTokenStore.get failed: ${e.message}`))}}async set(e){await mkdir(dirname(this.opts.path),{recursive:true}),await writeFile(this.opts.path,JSON.stringify(e,null,2),{mode:384});}async clear(){try{await unlink(this.opts.path);}catch(e){if(V(e)!=="ENOENT")throw e}}};function V(t){if(t&&typeof t=="object"&&"code"in t&&typeof t.code=="string")return t.code}var b=class{constructor(e){this.opts=e;}opts;async get(){let e=process.env[this.opts.accessTokenVar];if(!e)return null;let r=this.opts.refreshTokenVar?process.env[this.opts.refreshTokenVar]??"":"",o=this.opts.expiresAtVar?process.env[this.opts.expiresAtVar]:void 0,n=o?Number.parseInt(o,10):void 0;return {accessToken:e,refreshToken:r,expiresAt:n}}async set(e){}async clear(){}};var T=class{constructor(e){this.tokenStore=e;}tokenStore;workspaceToken=null;apiKey=null;async getTokens(){return this.tokenStore.get()}async setTokens(e){await this.tokenStore.set(e);}async clearTokens(){await this.tokenStore.clear(),this.workspaceToken=null;}setWorkspaceToken(e){this.workspaceToken=e;}getWorkspaceToken(){return this.workspaceToken}setApiKey(e){this.apiKey=e;}getApiKey(){return this.apiKey}async isAuthenticated(){return (await this.getTokens())?.accessToken?true:!!this.apiKey}};function v(t){let e=t?.tokenStore??new g(t?.tokens??null),r=new T(e);return t?.workspaceToken&&r.setWorkspaceToken(t.workspaceToken),t?.apiKey&&r.setApiKey(t.apiKey),r}var _={debug:10,info:20,warn:30,error:40};function O(t={}){let e=_[t.level??"warn"],r=t.prefix?`[${t.prefix}]`:"";function o(n,s,i){if(_[n]<e)return;let a$1=`${r}[${n}] ${a(s)}`,l=i?JSON.parse(a(JSON.stringify(i))):void 0;n==="error"||n==="warn"?console.error(a$1,l??""):console.warn(a$1,l??"");}return {debug:(n,s)=>o("debug",n,s),info:(n,s)=>o("info",n,s),warn:(n,s)=>o("warn",n,s),error:(n,s)=>o("error",n,s)}}var y=class{apis=new Map;set(e,r){this.apis.set(e,r);}get(e){if(!this.apis.has(e))throw new l(e);return this.apis.get(e)}has(e){return this.apis.has(e)}ids(){return Array.from(this.apis.keys())}};function Y(t){let e=t.productVersion??"0.0.0",r=t.env??Z(t.workspaceEndpoint),o=t.logger??O({level:t.logLevel??"warn",prefix:t.productName}),n=t.accessToken?{accessToken:t.accessToken,refreshToken:t.refreshToken??""}:null,s=v({tokens:n,workspaceToken:t.workspaceToken??null,apiKey:t.apiKey??null,tokenStore:t.tokenStore}),a={issuer:t.oidcIssuer??ee(t.globalEndpoint),clientId:t.clientId,clientSecret:t.clientSecret,redirectUri:t.redirectUri},l=new h({workspaceEndpoint:t.workspaceEndpoint,globalEndpoint:t.globalEndpoint,auth:s,timeout:t.timeout,autoRefresh:t.autoRefresh,onTokenRefresh:t.onTokenRefresh,defaultSignal:t.signal});return {productName:t.productName,productVersion:e,env:r,gql:{workspace:m(l,"workspace"),global:m(l,"global"),workspaceAuthOnly:m(l,"workspaceAuthOnly")},client:l,auth:s,oidc:a,logger:o,modules:new y,signal:t.signal}}function Z(t){return t.includes("localhost")||t.includes("127.0.0.1")?"local":t.includes("alpha")?"alpha":t.includes("dev")?"dev":"prod"}function ee(t){return t.includes("localhost")||t.includes("127.0.0.1")?t.replace(/\/graphql$/,"").replace(/\/global\/graphql$/,"/global"):"https://graphql.burdenoff.com/global"}function I(t){let e=new Map;for(let i of t){if(e.has(i.id))throw new b$1(`Duplicate module id: '${i.id}'`,"DUPLICATE_MODULE");e.set(i.id,i);}for(let i of t)for(let a of i.dependsOn??[])if(!e.has(a))throw new j$1(i.id,a);let r=[],o=new Set,n=new Set,s=(i,a)=>{if(!n.has(i.id)){if(o.has(i.id))throw new k([...a,i.id]);o.add(i.id);for(let l of i.dependsOn??[]){let u=e.get(l);u&&s(u,[...a,i.id]);}o.delete(i.id),n.add(i.id),r.push(i);}};for(let i of t)s(i,[]);return r}function De(t,e){let r=I(e),o={};for(let n of r){let s=n.attach(t);t.modules.set(n.id,s),o[n.id]=s;}return {ctx:t,modules:o}}
|
|
2
|
-
export{h as a,m as b,g as c,S as d,b as e,T as f,v as g,O as h,y as i,Y as j,I as k,De as l};
|