palbase 0.22.1 → 0.23.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/ai/index.js +2 -2
- package/dist/backend/engine.js +2 -2
- package/dist/backend/env.js +1 -1
- package/dist/backend/index.js +11 -11
- package/dist/backend/stack.js +1 -1
- package/dist/backend/test.js +2 -2
- package/dist/chunks/{IZH73QQW.js → 35PCXXWS.js} +2 -2
- package/dist/chunks/4N6DBTHE.js +21 -0
- package/dist/chunks/{SO6WAEOL.js → 4RAFUD5J.js} +1 -1
- package/dist/chunks/{GUHTHKQ7.js → 5QTY55XZ.js} +1 -1
- package/dist/chunks/{PRLEJFRO.js → 675S5LPE.js} +1 -1
- package/dist/chunks/{DPGX7OSC.js → A3LKL4L6.js} +2 -2
- package/dist/chunks/{SBKB3O33.js → BAGSKVPB.js} +2 -2
- package/dist/chunks/{56MEPQGY.js → BB57HGRH.js} +2 -2
- package/dist/chunks/{2V5VKJXB.js → D6PLSRTA.js} +1 -1
- package/dist/chunks/{QZX64KLT.js → E2UEUE4B.js} +2 -2
- package/dist/chunks/{6WAHQKN5.js → G3XVTFYH.js} +2 -2
- package/dist/chunks/{OLWZ7DGN.js → GO3DJFL2.js} +2 -2
- package/dist/chunks/{AVG7WTXK.js → IHEOFZ2Z.js} +2 -2
- package/dist/chunks/{C65W55SB.js → JZJXMPER.js} +2 -2
- package/dist/chunks/{IV4IHGMC.js → KQSO62BH.js} +2 -2
- package/dist/chunks/{V2V7QQAT.js → OLYFCCY7.js} +1 -1
- package/dist/chunks/{5NVQ2ZA3.js → OUNCAINB.js} +1 -1
- package/dist/chunks/{PUU5G4P3.js → QY4VHBSI.js} +1 -1
- package/dist/chunks/{352QZYNH.js → R5NMH5PL.js} +2 -2
- package/dist/chunks/TZC63UZ7.js +22 -0
- package/dist/chunks/{3PDILHR3.js → U5FQV4H6.js} +2 -2
- package/dist/chunks/{B7IQBQTB.js → XE5MJSS4.js} +2 -2
- package/dist/chunks/{IE3B45K2.js → YTTNY3PC.js} +2 -2
- package/dist/cli.js +137 -130
- package/dist/cloud/index.js +2 -2
- package/dist/refuse/ai.js +1 -1
- package/dist/refuse/backend.js +1 -1
- package/dist/refuse/cloud.js +1 -1
- package/dist/refuse/server.js +1 -1
- package/dist/server/index.js +2 -2
- package/dist/server/testing.js +2 -2
- package/dist/web/index.js +2 -2
- package/dist/web/message.js +2 -2
- package/dist/web/palbe.js +2 -2
- package/dist/web/paywall.js +2 -2
- package/dist/web/push-sw.js +1 -1
- package/dist/web/ssr.js +2 -2
- package/dist/web/vite.js +2 -2
- package/package.json +2 -2
- package/types/backend/src/attest.d.ts +18 -2
- package/types/backend/src/bootstrap.d.ts +2 -4
- package/types/backend/src/database.d.ts +12 -2
- package/types/backend/src/engine.d.ts +10 -3
- package/types/backend/src/index.d.ts +1 -1
- package/types/web/src/notify.d.ts +44 -2
- package/dist/chunks/3IKX72DZ.js +0 -22
- package/dist/chunks/CDB73SNL.js +0 -21
package/dist/cloud/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! palbase 0.
|
|
2
|
-
import{a as I}from"../chunks/PUU5G4P3.js";import{a as v,b as P,c as k,e as A,f as T,g as C,h as w,i as S,j as R,k as j,l as E,m as x,n as U}from"../chunks/6WAHQKN5.js";import{a as D,b as G}from"../chunks/IV4IHGMC.js";import{b,c as r,d as f}from"../chunks/56MEPQGY.js";import"../chunks/2V5VKJXB.js";import"../chunks/V2V7QQAT.js";function B(t){let e=v.client(t),i=P.client(t),s=k.client(t),g=A.client(t),p=T.client(t),l=C.client(t),d=w.client(t),o=S.client(t),n=R.client(t),u=j.client(t),m=E.client(t),c=x.client(t),a=U.client(t);return{ai:{draftAgent:e.draftAgent,listAgents:e.listAgents,getAgent:e.getAgent,putAgent:e.putAgent,deleteAgent:e.deleteAgent,publishAgent:e.publishAgent,rollbackAgent:e.rollbackAgent,listAgentVersions:e.listAgentVersions,listChats:e.listChats,createChat:e.createChat,getChat:e.getChat,deleteChat:e.deleteChat,decideChatApproval:e.decideChatApproval,forkChat:e.forkChat,getChatGoal:e.getChatGoal,setChatGoal:e.setChatGoal,clearChatGoal:e.clearChatGoal,updateChatGoal:e.updateChatGoal,putChatMember:e.putChatMember,deleteChatMember:e.deleteChatMember,listChatMessages:e.listChatMessages,sendChatMessage:e.sendChatMessage,getChatMessageAttachment:e.getChatMessageAttachment,listChatParts:e.listChatParts,putChatPipe:e.putChatPipe,deleteChatPipe:e.deleteChatPipe,sendSubagentMessage:e.sendSubagentMessage,stopSubagent:e.stopSubagent,stopChat:e.stopChat,listTurnToolCalls:e.listTurnToolCalls,getChatToolCall:e.getChatToolCall,answerChatToolCall:e.answerChatToolCall,listChatTurnArtifacts:e.listChatTurnArtifacts,getChatTurnArtifact:e.getChatTurnArtifact,getChatTurnCost:e.getChatTurnCost,startChatVoice:e.startChatVoice,getChatVoice:e.getChatVoice,closeChatVoice:e.closeChatVoice,commandChatVoice:e.commandChatVoice,getChatWorkspaceFile:e.getChatWorkspaceFile,addChatWorkspaceRepo:e.addChatWorkspaceRepo,createEmbeddings:e.createEmbeddings,listEndpoints:e.listEndpoints,putEndpoint:e.putEndpoint,deleteEndpoint:e.deleteEndpoint,createImage:e.createImage,getImage:e.getImage,getImageFile:e.getImageFile,listModels:e.listModels,listProviders:e.listProviders,connectProvider:e.connectProvider,disconnectProvider:e.disconnectProvider,listRepos:e.listRepos,putRepo:e.putRepo,deleteRepo:e.deleteRepo,createResponse:e.createResponse,getResponse:e.getResponse,cancelResponse:e.cancelResponse,followResponse:e.followResponse,getSettings:e.getSettings,putSettings:e.putSettings,getSpend:e.getSpend,askSupport:e.askSupport,listTools:e.listTools,listUsage:e.listUsage},analytics:{listAudiences:i.listAudiences,createAudience:i.createAudience,previewAudience:i.previewAudience,getAudience:i.getAudience,deleteAudience:i.deleteAudience,updateAudience:i.updateAudience,listAudienceMembers:i.listAudienceMembers,alias:i.alias,batch:i.batch,getEventBreakdown:i.getEventBreakdown,capture:i.capture,sendConsoleHistory:i.sendConsoleHistory,getConsoleConfig:i.getConsoleConfig,listConsoleRecords:i.listConsoleRecords,listEventNames:i.listEventNames,listEvents:i.listEvents,getEventTimeline:i.getEventTimeline,runFunnel:i.runFunnel,identify:i.identify,page:i.page,sendPerf:i.sendPerf,listPerfGroups:i.listPerfGroups,getPerfConfig:i.getPerfConfig,getPerfTimeline:i.getPerfTimeline,listRequestLines:i.listRequestLines,getMachineTraffic:i.getMachineTraffic,runRetention:i.runRetention,screen:i.screen,getSettings:i.getSettings,putSettings:i.putSettings,getSummary:i.getSummary,listTraces:i.listTraces,sendTrace:i.sendTrace,sendTraceBatch:i.sendTraceBatch,getTraceHops:i.getTraceHops,listSessionTraces:i.listSessionTraces,getTraceSummary:i.getTraceSummary,getTraceTimeline:i.getTraceTimeline,searchPeople:i.searchPeople,setPersonProperties:i.setPersonProperties,getPerson:i.getPerson,listPersonEvents:i.listPersonEvents,getEventCatalog:i.getEventCatalog,defineEvent:i.defineEvent},auth:{adminVerifyDeviceAssertion:s.adminVerifyDeviceAssertion,adminGetAttestPolicy:s.adminGetAttestPolicy,adminGetAttestObservations:s.adminGetAttestObservations,adminRecordAttestObservations:s.adminRecordAttestObservations,adminListAuditEvents:s.adminListAuditEvents,adminExportAuditEvents:s.adminExportAuditEvents,adminVerifyAuditTrail:s.adminVerifyAuditTrail,adminGetAuthSettings:s.adminGetAuthSettings,adminUpdateAuthSettings:s.adminUpdateAuthSettings,adminGetBreachWatch:s.adminGetBreachWatch,adminListHooks:s.adminListHooks,adminCreateHook:s.adminCreateHook,adminUpdateHook:s.adminUpdateHook,adminDeleteHook:s.adminDeleteHook,adminListHookExecutions:s.adminListHookExecutions,adminListIntegrations:s.adminListIntegrations,adminPutIntegration:s.adminPutIntegration,adminDeleteIntegration:s.adminDeleteIntegration,adminListOAuthClients:s.adminListOAuthClients,adminCreateOAuthClient:s.adminCreateOAuthClient,adminGetOAuthClient:s.adminGetOAuthClient,adminDeleteOAuthClient:s.adminDeleteOAuthClient,adminUpdateOAuthClient:s.adminUpdateOAuthClient,adminListProviders:s.adminListProviders,adminGetPhoneSettings:s.adminGetPhoneSettings,adminUpdatePhoneSettings:s.adminUpdatePhoneSettings,adminToggleProvider:s.adminToggleProvider,adminListRoles:s.adminListRoles,adminUpsertRole:s.adminUpsertRole,adminDeleteRole:s.adminDeleteRole,adminListServiceAccounts:s.adminListServiceAccounts,adminCreateServiceAccount:s.adminCreateServiceAccount,adminGetServiceAccount:s.adminGetServiceAccount,adminRevokeServiceAccount:s.adminRevokeServiceAccount,adminRotateServiceAccount:s.adminRotateServiceAccount,adminListSessions:s.adminListSessions,adminRevokeSession:s.adminRevokeSession,adminListSigningKeys:s.adminListSigningKeys,adminRotateSigningKey:s.adminRotateSigningKey,socialAdminConfig:s.socialAdminConfig,socialCredentialPut:s.socialCredentialPut,socialCredentialDelete:s.socialCredentialDelete,socialProviderPatch:s.socialProviderPatch,adminGetStats:s.adminGetStats,adminSendTestTemplate:s.adminSendTestTemplate,adminListTestUsers:s.adminListTestUsers,adminCreateTestUsers:s.adminCreateTestUsers,adminSetTestUserPhone:s.adminSetTestUserPhone,adminDeleteTestUser:s.adminDeleteTestUser,adminCreateCustomToken:s.adminCreateCustomToken,adminListUsers:s.adminListUsers,adminCreateUser:s.adminCreateUser,adminImportUsers:s.adminImportUsers,adminGetUser:s.adminGetUser,adminDeleteUser:s.adminDeleteUser,adminUpdateUser:s.adminUpdateUser,adminBanUser:s.adminBanUser,adminGetUserConsents:s.adminGetUserConsents,adminRevokeUserCredentials:s.adminRevokeUserCredentials,adminExportUser:s.adminExportUser,adminListUserMfaFactors:s.adminListUserMfaFactors,adminResetUserMfa:s.adminResetUserMfa,adminResetUserPassword:s.adminResetUserPassword,adminListUserRoles:s.adminListUserRoles,adminAssignUserRole:s.adminAssignUserRole,adminRevokeUserRole:s.adminRevokeUserRole,adminRevokeUserSessions:s.adminRevokeUserSessions,adminUnbanUser:s.adminUnbanUser,adminGetInstallationConsents:s.adminGetInstallationConsents,adminRefuseConsents:s.adminRefuseConsents},flags:{getValues:g.getValues,batchUserValues:g.batchUserValues,getDelta:g.getDelta,getEvaluations:g.getEvaluations,listExperiments:g.listExperiments,startExperiment:g.startExperiment,getExperiment:g.getExperiment,getExperimentResults:g.getExperimentResults,stopExperiment:g.stopExperiment,declareExperimentWinner:g.declareExperimentWinner,getCurrentInstallations:g.getCurrentInstallations,getInstallationsDaily:g.getInstallationsDaily,getSnapshot:g.getSnapshot,listDefinitions:g.listDefinitions,getDefinition:g.getDefinition,putDefinition:g.putDefinition,deleteDefinition:g.deleteDefinition,activateTemplates:g.activateTemplates,getActiveTemplate:g.getActiveTemplate,getTemplateCapabilities:g.getTemplateCapabilities,getTemplateDraft:g.getTemplateDraft,createTemplateDraft:g.createTemplateDraft,discardTemplateDraft:g.discardTemplateDraft,putTemplateParameter:g.putTemplateParameter,removeTemplateParameter:g.removeTemplateParameter,reviewTemplateDraft:g.reviewTemplateDraft,publishTemplate:g.publishTemplate,getPublishReceipt:g.getPublishReceipt,restoreTemplateVersion:g.restoreTemplateVersion,listTemplateVersions:g.listTemplateVersions,getTemplateVersion:g.getTemplateVersion,getUserValues:g.getUserValues,putUserValues:g.putUserValues,deleteUserValues:g.deleteUserValues,putUserValue:g.putUserValue,deleteUserValue:g.deleteUserValue},journeys:{listJourneys:p.listJourneys,createJourney:p.createJourney,listPersonRuns:p.listPersonRuns,simulateJourney:p.simulateJourney,validateJourney:p.validateJourney,getJourney:p.getJourney,updateJourney:p.updateJourney,deleteJourney:p.deleteJourney,copyJourney:p.copyJourney,publishJourney:p.publishJourney,listJourneyRuns:p.listJourneyRuns,getJourneyStats:p.getJourneyStats,stopJourney:p.stopJourney,testJourney:p.testJourney},machines:{listMachines:l.listMachines,createMachine:l.createMachine,listMachineSizes:l.listMachineSizes,getMachineNetwork:l.getMachineNetwork,connectGitHub:l.connectGitHub,listInstallations:l.listInstallations,linkInstallation:l.linkInstallation,shareInstallation:l.shareInstallation,unlinkInstallation:l.unlinkInstallation,listRepositories:l.listRepositories,getMachine:l.getMachine,deleteMachine:l.deleteMachine,updateMachine:l.updateMachine,listBuilds:l.listBuilds,deployMachine:l.deployMachine,getBuild:l.getBuild,getBuildLog:l.getBuildLog,rollbackMachine:l.rollbackMachine,listDatabases:l.listDatabases,createDatabase:l.createDatabase,listDatabaseSizes:l.listDatabaseSizes,getDatabase:l.getDatabase,deleteDatabase:l.deleteDatabase,updateDatabase:l.updateDatabase,undeleteDatabase:l.undeleteDatabase,purgeDatabase:l.purgeDatabase,getDatabaseCredentials:l.getDatabaseCredentials,changeDatabasePassword:l.changeDatabasePassword,readMachineLogs:l.readMachineLogs,getMachineMetrics:l.getMachineMetrics,getMachineContract:l.getMachineContract,restoreDatabase:l.restoreDatabase,getDatabaseSchema:l.getDatabaseSchema,getDatabaseMetrics:l.getDatabaseMetrics,queryDatabase:l.queryDatabase,listCrons:l.listCrons,listCronRuns:l.listCronRuns,runCron:l.runCron,pauseCron:l.pauseCron,resumeCron:l.resumeCron,listTasks:l.listTasks,enqueueTask:l.enqueueTask,getTask:l.getTask,cancelTask:l.cancelTask,retryTask:l.retryTask,listTaskTypes:l.listTaskTypes,makeTemplatedTestUsers:l.makeTemplatedTestUsers,templateTestUser:l.templateTestUser,deleteTemplatedTestUser:l.deleteTemplatedTestUser},messaging:{adminAccessLog:d.adminAccessLog,adminListConversations:d.adminListConversations,adminCreateConversation:d.adminCreateConversation,adminGetConversation:d.adminGetConversation,adminDeleteConversation:d.adminDeleteConversation,adminAddMembers:d.adminAddMembers,adminRemoveMember:d.adminRemoveMember,adminListMessages:d.adminListMessages,adminSendMessage:d.adminSendMessage,adminDeleteMessage:d.adminDeleteMessage,adminFileUrl:d.adminFileUrl,adminPutProfile:d.adminPutProfile,adminListReports:d.adminListReports,adminGetReport:d.adminGetReport,adminReportFileUrl:d.adminReportFileUrl,adminResolveReport:d.adminResolveReport,getSettings:d.getSettings,putSettings:d.putSettings,rotateHookSecret:d.rotateHookSecret},notify:{getDeliverability:o.getDeliverability,listDevices:o.listDevices,getDeviceStats:o.getDeviceStats,deleteMyDevice:o.deleteMyDevice,sendEmail:o.sendEmail,listInAppCampaigns:o.listInAppCampaigns,createInAppCampaign:o.createInAppCampaign,getInAppCampaign:o.getInAppCampaign,putInAppCampaign:o.putInAppCampaign,deleteInAppCampaign:o.deleteInAppCampaign,getInAppCampaignStats:o.getInAppCampaignStats,listInAppTemplates:o.listInAppTemplates,sendInbox:o.sendInbox,listInboxMessages:o.listInboxMessages,listNotifyMessages:o.listNotifyMessages,getNotifyMessage:o.getNotifyMessage,cancelMessage:o.cancelMessage,getMetricsSummary:o.getMetricsSummary,listNotifyProviders:o.listNotifyProviders,putNotifyProvider:o.putNotifyProvider,deleteNotifyProvider:o.deleteNotifyProvider,sendPush:o.sendPush,getNotifySettings:o.getNotifySettings,putNotifySettings:o.putNotifySettings,sendSms:o.sendSms,listEmailTemplates:o.listEmailTemplates,getEmailTemplate:o.getEmailTemplate,putEmailTemplate:o.putEmailTemplate,deleteEmailTemplate:o.deleteEmailTemplate,listPushTemplates:o.listPushTemplates,getPushTemplate:o.getPushTemplate,putPushTemplate:o.putPushTemplate,deletePushTemplate:o.deletePushTemplate,listSmsTemplates:o.listSmsTemplates,getSmsTemplate:o.getSmsTemplate,putSmsTemplate:o.putSmsTemplate,deleteSmsTemplate:o.deleteSmsTemplate,listWhatsAppTemplates:o.listWhatsAppTemplates,getWhatsAppTemplate:o.getWhatsAppTemplate,putWhatsAppTemplate:o.putWhatsAppTemplate,deleteWhatsAppTemplate:o.deleteWhatsAppTemplate,listTopics:o.listTopics,createTopic:o.createTopic,deleteTopic:o.deleteTopic,changeTopic:o.changeTopic,addTopicSubscribers:o.addTopicSubscribers,removeTopicSubscriber:o.removeTopicSubscriber,listUserDevices:o.listUserDevices,getUserPreferences:o.getUserPreferences,setUserPreferences:o.setUserPreferences,startVerification:o.startVerification,checkVerification:o.checkVerification,getWebPushStatus:o.getWebPushStatus,sendWhatsApp:o.sendWhatsApp,listWhatsAppInbound:o.listWhatsAppInbound},purchases:{getAppleAccount:n.getAppleAccount,disconnectApple:n.disconnectApple,createAppleGrant:n.createAppleGrant,getAppleReadiness:n.getAppleReadiness,setXcodeCertificate:n.setXcodeCertificate,clearXcodeCertificate:n.clearXcodeCertificate,getGoogleAccount:n.getGoogleAccount,connectGoogle:n.connectGoogle,disconnectGoogle:n.disconnectGoogle,getCatalog:n.getCatalog,saveCatalog:n.saveCatalog,planCatalog:n.planCatalog,getCatalogPlan:n.getCatalogPlan,confirmCatalogPlan:n.confirmCatalogPlan,declineCatalogPlan:n.declineCatalogPlan,validateCatalog:n.validateCatalog,listCharts:n.listCharts,getChartsOverview:n.getChartsOverview,getChart:n.getChart,getCustomer:n.getCustomer,grantCredits:n.grantCredits,listCreditEntries:n.listCreditEntries,forgiveCredits:n.forgiveCredits,listCustomerGrants:n.listCustomerGrants,grantEntitlement:n.grantEntitlement,revokeGrant:n.revokeGrant,holdSpend:n.holdSpend,setCustomerLimit:n.setCustomerLimit,clearCustomerLimit:n.clearCustomerLimit,grantLimit:n.grantLimit,spend:n.spend,commitSpend:n.commitSpend,extendHold:n.extendHold,releaseSpend:n.releaseSpend,reverseSpend:n.reverseSpend,listExperiments:n.listExperiments,startExperiment:n.startExperiment,getExperiment:n.getExperiment,getExperimentResults:n.getExperimentResults,stopExperiment:n.stopExperiment,declareExperimentWinner:n.declareExperimentWinner,getOfferings:n.getOfferings,listPaywalls:n.listPaywalls,createPaywall:n.createPaywall,listPaywallAssets:n.listPaywallAssets,registerPaywallAsset:n.registerPaywallAsset,deletePaywallAsset:n.deletePaywallAsset,listPaywallTemplates:n.listPaywallTemplates,getPaywallTemplateAsset:n.getPaywallTemplateAsset,validatePaywall:n.validatePaywall,getPaywall:n.getPaywall,deletePaywall:n.deletePaywall,savePaywallDraft:n.savePaywallDraft,publishPaywall:n.publishPaywall,listPaywallVersions:n.listPaywallVersions,getPaywallVersion:n.getPaywallVersion,listPlacements:n.listPlacements,listAttributeKeys:n.listAttributeKeys,setPlacement:n.setPlacement,deletePlacement:n.deletePlacement,recordPaywallExposure:n.recordPaywallExposure,getPlacementPaywall:n.getPlacementPaywall,previewPlacement:n.previewPlacement,getPlacementResults:n.getPlacementResults,getPlacementRules:n.getPlacementRules,setPlacementRules:n.setPlacementRules,getSettings:n.getSettings,updateSettings:n.updateSettings,getStripeAccount:n.getStripeAccount,disconnectStripe:n.disconnectStripe,checkStripeAccount:n.checkStripeAccount,createCheckout:n.createCheckout,createCheckoutRedemption:n.createCheckoutRedemption,createStripeGrant:n.createStripeGrant,createStripeAppInstall:n.createStripeAppInstall,getOfferStats:n.getOfferStats,listCoupons:n.listCoupons,createCoupon:n.createCoupon,getCoupon:n.getCoupon,revokeCoupon:n.revokeCoupon,listCouponCodes:n.listCouponCodes,setXcodeOfferKey:n.setXcodeOfferKey,searchCustomers:n.searchCustomers,getCustomerHistory:n.getCustomerHistory,listCatalogRevisions:n.listCatalogRevisions,getCatalogRevision:n.getCatalogRevision,restoreCatalogRevision:n.restoreCatalogRevision,extendSubscription:n.extendSubscription,refundSubscription:n.refundSubscription,cancelSubscription:n.cancelSubscription},realtime:{broadcast:u.broadcast,getChannels:u.getChannels,putChannels:u.putChannels,getLimits:u.getLimits,putLimits:u.putLimits,revalidate:u.revalidate,writeState:u.writeState,getStats:u.getStats},secrets:{listSecretAudit:m.listSecretAudit,listFieldKeys:m.listFieldKeys,getFieldKeys:m.getFieldKeys,openFields:m.openFields,sealPlaceholder:m.sealPlaceholder,rotateFieldKeys:m.rotateFieldKeys,listTransitKeys:m.listTransitKeys,getTransitKeys:m.getTransitKeys,getTransitPublicKeys:m.getTransitPublicKeys,rotateTransitKeys:m.rotateTransitKeys,retireTransitKey:m.retireTransitKey,listSecrets:m.listSecrets,getEnvironmentValues:m.getEnvironmentValues,getSecret:m.getSecret,putSecret:m.putSecret,deleteSecret:m.deleteSecret,rollbackSecret:m.rollbackSecret,listSecretVersions:m.listSecretVersions},storage:{listBuckets:c.listBuckets,getBucket:c.getBucket,putBucket:c.putBucket,deleteBucket:c.deleteBucket,copyObject:c.copyObject,moveObject:c.moveObject,listObjects:c.listObjects,getObject:c.getObject,putObject:c.putObject,deleteObject:c.deleteObject,headObject:c.headObject,createSignedUrl:c.createSignedUrl,createUploadUrl:c.createUploadUrl,getStorageStats:c.getStorageStats},stores:{listActions:a.listActions,getAction:a.getAction,confirmAction:a.confirmAction,declineAction:a.declineAction,getAppleAccount:a.getAppleAccount,disconnectApple:a.disconnectApple,checkAppleAccount:a.checkAppleAccount,createAppleGrant:a.createAppleGrant,getSandboxReadiness:a.getSandboxReadiness,listSandboxTesters:a.listSandboxTesters,clearSandboxPurchaseHistory:a.clearSandboxPurchaseHistory,updateSandboxTester:a.updateSandboxTester,listApps:a.listApps,listFeedback:a.listFeedback,getFeedback:a.getFeedback,listGroups:a.listGroups,createGroup:a.createGroup,linkApp:a.linkApp,getListing:a.getListing,setListing:a.setListing,planListing:a.planListing,createPackage:a.createPackage,uploadScreenshot:a.uploadScreenshot,getReviewInfo:a.getReviewInfo,setReviewInfo:a.setReviewInfo,getUploadKey:a.getUploadKey,getAppStoreVersion:a.getAppStoreVersion,prepareAppStoreVersion:a.prepareAppStoreVersion,planPhasedRelease:a.planPhasedRelease,planReleaseVersion:a.planReleaseVersion,planSubmitReview:a.planSubmitReview,planWithdrawReview:a.planWithdrawReview,getAppVitals:a.getAppVitals,getAppWebhook:a.getAppWebhook,makeAppWebhook:a.makeAppWebhook,pingAppWebhook:a.pingAppWebhook,getGoogleAccount:a.getGoogleAccount,connectGoogle:a.connectGoogle,disconnectGoogle:a.disconnectGoogle,checkGoogleAccount:a.checkGoogleAccount,deleteGroup:a.deleteGroup,renameGroup:a.renameGroup,addGroupBuild:a.addGroupBuild,listTesters:a.listTesters,setTesters:a.setTesters,listPackages:a.listPackages,getPackage:a.getPackage,planBetaReview:a.planBetaReview,listDeliveries:a.listDeliveries,deliver:a.deliver,getSignedBundleLink:a.getSignedBundleLink,planExpire:a.planExpire,planExportCompliance:a.planExportCompliance,setWhatToTest:a.setWhatToTest,getAppleSession:a.getAppleSession,disconnectAppleSession:a.disconnectAppleSession,checkAppleSession:a.checkAppleSession,createAppleIdGrant:a.createAppleIdGrant,getAppReview:a.getAppReview,getReviewAttachment:a.getReviewAttachment,setReviewDraft:a.setReviewDraft,sendReviewDraft:a.sendReviewDraft,getAppPrivacy:a.getAppPrivacy,setAppPrivacy:a.setAppPrivacy,makeAppRecord:a.makeAppRecord,removeAppRecord:a.removeAppRecord,listMadeAppleKeys:a.listMadeAppleKeys,makeAppleKey:a.makeAppleKey,revokeMadeAppleKey:a.revokeMadeAppleKey,shareAppleSession:a.shareAppleSession,unshareAppleSession:a.unshareAppleSession}}}function M(t){return{orgs:{async list(e){return t.send({op:"orgs.list",method:"GET",path:"/v1/orgs",auth:[["PalbaseBearer"]],answers:{200:"json"},signal:e?.signal})},async get(e){return t.send({op:"orgs.get",method:"GET",path:"/v1/orgs/"+r("orgs.get","id",e.path.id),auth:[["PalbaseBearer"]],answers:{200:"json"},signal:e.signal})},async members(e){return t.send({op:"orgs.members",method:"GET",path:"/v1/orgs/"+r("orgs.members","id",e.path.id)+"/members",auth:[["PalbaseBearer"]],answers:{200:"json"},signal:e.signal})},async auditLog(e){return t.send({op:"orgs.auditLog",method:"GET",path:"/v1/orgs/"+r("orgs.auditLog","id",e.path.id)+"/audit",auth:[["PalbaseBearer"]],answers:{200:"json"},query:e.query,signal:e.signal})}},invitations:{async mine(e){return t.send({op:"invitations.mine",method:"GET",path:"/v1/invitations",auth:[["PalbaseBearer"]],answers:{200:"json"},signal:e?.signal})},async accept(e){return t.send({op:"invitations.accept",method:"POST",path:"/v1/invitations/"+r("invitations.accept","id",e.path.id)+"/accept",auth:[["PalbaseBearer"]],answers:{200:"json"},idempotent:!0,headers:e.headers,signal:e.signal})}},orgWebhooks:{async list(e){return t.send({op:"orgWebhooks.list",method:"GET",path:"/v1/orgs/"+r("orgWebhooks.list","id",e.path.id)+"/webhooks",auth:[["PalbaseBearer"]],answers:{200:"json"},signal:e.signal})},async add(e){return t.send({op:"orgWebhooks.add",method:"POST",path:"/v1/orgs/"+r("orgWebhooks.add","id",e.path.id)+"/webhooks",auth:[["PalbaseBearer"]],answers:{200:"json"},idempotent:!0,headers:e.headers,body:{kind:"json",contentType:"application/json",value:e.body},signal:e.signal})},async remove(e){return t.send({op:"orgWebhooks.remove",method:"DELETE",path:"/v1/orgs/"+r("orgWebhooks.remove","id",e.path.id)+"/webhooks/"+r("orgWebhooks.remove","endpoint",e.path.endpoint),auth:[["PalbaseBearer"]],answers:{204:"empty"},idempotent:!0,headers:e.headers,signal:e.signal})}},projects:{async mine(e){return t.send({op:"projects.mine",method:"GET",path:"/v1/projects",auth:[["PalbaseBearer"]],answers:{200:"json"},signal:e?.signal})},async environmentsMine(e){return t.send({op:"projects.environmentsMine",method:"GET",path:"/v1/environments",auth:[["PalbaseBearer"]],answers:{200:"json"},signal:e?.signal})},async list(e){return t.send({op:"projects.list",method:"GET",path:"/v1/orgs/"+r("projects.list","id",e.path.id)+"/projects",auth:[["PalbaseBearer"]],answers:{200:"json"},signal:e.signal})},async create(e){return t.send({op:"projects.create",method:"POST",path:"/v1/orgs/"+r("projects.create","id",e.path.id)+"/projects",auth:[["PalbaseBearer"]],answers:{200:"json"},idempotent:!0,headers:e.headers,body:{kind:"json",contentType:"application/json",value:e.body},signal:e.signal})},async get(e){return t.send({op:"projects.get",method:"GET",path:"/v1/projects/"+r("projects.get","id",e.path.id),auth:[["PalbaseBearer"]],answers:{200:"json"},signal:e.signal})},async remove(e){return t.send({op:"projects.remove",method:"DELETE",path:"/v1/projects/"+r("projects.remove","id",e.path.id),auth:[["PalbaseBearer"]],answers:{204:"empty"},idempotent:!0,query:e.query,headers:e.headers,signal:e.signal})},async rename(e){return t.send({op:"projects.rename",method:"PATCH",path:"/v1/projects/"+r("projects.rename","id",e.path.id),auth:[["PalbaseBearer"]],answers:{200:"json"},idempotent:!0,headers:e.headers,body:{kind:"json",contentType:"application/json",value:e.body},signal:e.signal})},async addEnvironment(e){return t.send({op:"projects.addEnvironment",method:"POST",path:"/v1/projects/"+r("projects.addEnvironment","id",e.path.id)+"/environments",auth:[["PalbaseBearer"]],answers:{200:"json"},idempotent:!0,headers:e.headers,body:{kind:"json",contentType:"application/json",value:e.body},signal:e.signal})},async environment(e){return t.send({op:"projects.environment",method:"GET",path:"/v1/environments/"+r("projects.environment","ref",e.path.ref),auth:[["PalbaseBearer"]],answers:{200:"json"},signal:e.signal})},async removeEnvironment(e){return t.send({op:"projects.removeEnvironment",method:"DELETE",path:"/v1/environments/"+r("projects.removeEnvironment","ref",e.path.ref),auth:[["PalbaseBearer"]],answers:{204:"empty"},idempotent:!0,query:e.query,headers:e.headers,signal:e.signal})},async renameEnvironment(e){return t.send({op:"projects.renameEnvironment",method:"PATCH",path:"/v1/environments/"+r("projects.renameEnvironment","ref",e.path.ref),auth:[["PalbaseBearer"]],answers:{200:"json"},idempotent:!0,headers:e.headers,body:{kind:"json",contentType:"application/json",value:e.body},signal:e.signal})},async keys(e){return t.send({op:"projects.keys",method:"GET",path:"/v1/environments/"+r("projects.keys","ref",e.path.ref)+"/keys",auth:[["PalbaseBearer"]],answers:{200:"json"},signal:e.signal})},async usage(e){return t.send({op:"projects.usage",method:"GET",path:"/v1/environments/"+r("projects.usage","ref",e.path.ref)+"/usage",auth:[["PalbaseBearer"]],answers:{200:"json"},query:e.query,signal:e.signal})},async personalKey(e){return t.send({op:"projects.personalKey",method:"POST",path:"/v1/environments/"+r("projects.personalKey","ref",e.path.ref)+"/personal-key",auth:[["PalbaseBearer"]],answers:{200:"json"},idempotent:!0,headers:e.headers,body:{kind:"json",contentType:"application/json",value:e.body},signal:e.signal})},async revokePersonalKey(e){return t.send({op:"projects.revokePersonalKey",method:"DELETE",path:"/v1/environments/"+r("projects.revokePersonalKey","ref",e.path.ref)+"/personal-key/"+r("projects.revokePersonalKey","key",e.path.key),auth:[["PalbaseBearer"]],answers:{204:"empty"},idempotent:!0,headers:e.headers,signal:e.signal})},async shareInstallation(e){return t.send({op:"projects.shareInstallation",method:"POST",path:"/v1/environments/"+r("projects.shareInstallation","ref",e.path.ref)+"/github/installations",auth:[["PalbaseBearer"]],answers:{},ownResponse:!0,idempotent:!0,headers:e.headers,body:{kind:"json",contentType:"application/json",value:e.body},signal:e.signal})}},apps:{async list(e){return t.send({op:"apps.list",method:"GET",path:"/v1/projects/"+r("apps.list","id",e.path.id)+"/apps",auth:[["PalbaseBearer"]],answers:{200:"json"},signal:e.signal})},async create(e){return t.send({op:"apps.create",method:"POST",path:"/v1/projects/"+r("apps.create","id",e.path.id)+"/apps",auth:[["PalbaseBearer"]],answers:{200:"json"},idempotent:!0,headers:e.headers,body:{kind:"json",contentType:"application/json",value:e.body},signal:e.signal})},async get(e){return t.send({op:"apps.get",method:"GET",path:"/v1/projects/"+r("apps.get","id",e.path.id)+"/apps/"+r("apps.get","app",e.path.app),auth:[["PalbaseBearer"]],answers:{200:"json"},signal:e.signal})},async remove(e){return t.send({op:"apps.remove",method:"DELETE",path:"/v1/projects/"+r("apps.remove","id",e.path.id)+"/apps/"+r("apps.remove","app",e.path.app),auth:[["PalbaseBearer"]],answers:{200:"json"},idempotent:!0,headers:e.headers,signal:e.signal})},async update(e){return t.send({op:"apps.update",method:"PATCH",path:"/v1/projects/"+r("apps.update","id",e.path.id)+"/apps/"+r("apps.update","app",e.path.app),auth:[["PalbaseBearer"]],answers:{200:"json"},idempotent:!0,headers:e.headers,body:{kind:"json",contentType:"application/json",value:e.body},signal:e.signal})},async restore(e){return t.send({op:"apps.restore",method:"POST",path:"/v1/projects/"+r("apps.restore","id",e.path.id)+"/apps/"+r("apps.restore","app",e.path.app)+"/restore",auth:[["PalbaseBearer"]],answers:{200:"json"},idempotent:!0,headers:e.headers,signal:e.signal})},async setIn(e){return t.send({op:"apps.setIn",method:"PUT",path:"/v1/environments/"+r("apps.setIn","ref",e.path.ref)+"/apps/"+r("apps.setIn","app",e.path.app),auth:[["PalbaseBearer"]],answers:{200:"json"},idempotent:!0,headers:e.headers,body:{kind:"json",contentType:"application/json",value:e.body},signal:e.signal})},async removeFrom(e){return t.send({op:"apps.removeFrom",method:"DELETE",path:"/v1/environments/"+r("apps.removeFrom","ref",e.path.ref)+"/apps/"+r("apps.removeFrom","app",e.path.app),auth:[["PalbaseBearer"]],answers:{204:"empty"},idempotent:!0,headers:e.headers,signal:e.signal})},async config(e){return t.send({op:"apps.config",method:"GET",path:"/v1/environments/"+r("apps.config","ref",e.path.ref)+"/apps/"+r("apps.config","app",e.path.app)+"/config",auth:[["PalbaseBearer"]],answers:{200:"json"},signal:e.signal})}},snippets:{async list(e){return t.send({op:"snippets.list",method:"GET",path:"/v1/environments/"+r("snippets.list","ref",e.path.ref)+"/snippets",auth:[["PalbaseBearer"]],answers:{200:"json"},signal:e.signal})},async create(e){return t.send({op:"snippets.create",method:"POST",path:"/v1/environments/"+r("snippets.create","ref",e.path.ref)+"/snippets",auth:[["PalbaseBearer"]],answers:{200:"json"},idempotent:!0,headers:e.headers,body:{kind:"json",contentType:"application/json",value:e.body},signal:e.signal})},async remove(e){return t.send({op:"snippets.remove",method:"DELETE",path:"/v1/environments/"+r("snippets.remove","ref",e.path.ref)+"/snippets/"+r("snippets.remove","id",e.path.id),auth:[["PalbaseBearer"]],answers:{204:"empty"},idempotent:!0,headers:e.headers,signal:e.signal})},async change(e){return t.send({op:"snippets.change",method:"PATCH",path:"/v1/environments/"+r("snippets.change","ref",e.path.ref)+"/snippets/"+r("snippets.change","id",e.path.id),auth:[["PalbaseBearer"]],answers:{200:"json"},idempotent:!0,headers:e.headers,body:{kind:"json",contentType:"application/json",value:e.body},signal:e.signal})}},chartViews:{async list(e){return t.send({op:"chartViews.list",method:"GET",path:"/v1/environments/"+r("chartViews.list","ref",e.path.ref)+"/chart-views",auth:[["PalbaseBearer"]],answers:{200:"json"},signal:e.signal})},async create(e){return t.send({op:"chartViews.create",method:"POST",path:"/v1/environments/"+r("chartViews.create","ref",e.path.ref)+"/chart-views",auth:[["PalbaseBearer"]],answers:{200:"json"},idempotent:!0,headers:e.headers,body:{kind:"json",contentType:"application/json",value:e.body},signal:e.signal})},async remove(e){return t.send({op:"chartViews.remove",method:"DELETE",path:"/v1/environments/"+r("chartViews.remove","ref",e.path.ref)+"/chart-views/"+r("chartViews.remove","id",e.path.id),auth:[["PalbaseBearer"]],answers:{204:"empty"},idempotent:!0,headers:e.headers,signal:e.signal})},async change(e){return t.send({op:"chartViews.change",method:"PATCH",path:"/v1/environments/"+r("chartViews.change","ref",e.path.ref)+"/chart-views/"+r("chartViews.change","id",e.path.id),auth:[["PalbaseBearer"]],answers:{200:"json"},idempotent:!0,headers:e.headers,body:{kind:"json",contentType:"application/json",value:e.body},signal:e.signal})}},webhooks:{async list(e){return t.send({op:"webhooks.list",method:"GET",path:"/v1/environments/"+r("webhooks.list","ref",e.path.ref)+"/webhooks",auth:[["PalbaseBearer"]],answers:{200:"json"},signal:e.signal})},async add(e){return t.send({op:"webhooks.add",method:"POST",path:"/v1/environments/"+r("webhooks.add","ref",e.path.ref)+"/webhooks",auth:[["PalbaseBearer"]],answers:{200:"json"},idempotent:!0,headers:e.headers,body:{kind:"json",contentType:"application/json",value:e.body},signal:e.signal})},async deliveries(e){return t.send({op:"webhooks.deliveries",method:"GET",path:"/v1/environments/"+r("webhooks.deliveries","ref",e.path.ref)+"/webhooks/deliveries",auth:[["PalbaseBearer"]],answers:{200:"json"},query:e.query,signal:e.signal})},async redeliver(e){return t.send({op:"webhooks.redeliver",method:"POST",path:"/v1/environments/"+r("webhooks.redeliver","ref",e.path.ref)+"/webhooks/deliveries/"+r("webhooks.redeliver","delivery",e.path.delivery)+"/redeliver",auth:[["PalbaseBearer"]],answers:{200:"json"},idempotent:!0,headers:e.headers,signal:e.signal})},async change(e){return t.send({op:"webhooks.change",method:"PUT",path:"/v1/environments/"+r("webhooks.change","ref",e.path.ref)+"/webhooks/"+r("webhooks.change","endpoint",e.path.endpoint),auth:[["PalbaseBearer"]],answers:{200:"json"},idempotent:!0,headers:e.headers,body:{kind:"json",contentType:"application/json",value:e.body},signal:e.signal})},async remove(e){return t.send({op:"webhooks.remove",method:"DELETE",path:"/v1/environments/"+r("webhooks.remove","ref",e.path.ref)+"/webhooks/"+r("webhooks.remove","endpoint",e.path.endpoint),auth:[["PalbaseBearer"]],answers:{204:"empty"},idempotent:!0,headers:e.headers,signal:e.signal})}},environmentTokens:{async list(e){return t.send({op:"environmentTokens.list",method:"GET",path:"/v1/environments/"+r("environmentTokens.list","ref",e.path.ref)+"/tokens",auth:[["PalbaseBearer"]],answers:{200:"json"},signal:e.signal})},async mint(e){return t.send({op:"environmentTokens.mint",method:"POST",path:"/v1/environments/"+r("environmentTokens.mint","ref",e.path.ref)+"/tokens",auth:[["PalbaseBearer"],[]],answers:{200:"json"},idempotent:!0,headers:e.headers,body:{kind:"json",contentType:"application/json",value:e.body},signal:e.signal})},async revoke(e){return t.send({op:"environmentTokens.revoke",method:"DELETE",path:"/v1/environments/"+r("environmentTokens.revoke","ref",e.path.ref)+"/tokens/"+r("environmentTokens.revoke","id",e.path.id),auth:[["PalbaseBearer"]],answers:{204:"empty"},idempotent:!0,headers:e.headers,signal:e.signal})}},billing:{async bill(e){return t.send({op:"billing.bill",method:"GET",path:"/v1/orgs/"+r("billing.bill","id",e.path.id)+"/billing",auth:[["PalbaseBearer"]],answers:{200:"json"},signal:e.signal})},async confirm(e){return t.send({op:"billing.confirm",method:"POST",path:"/v1/orgs/"+r("billing.confirm","id",e.path.id)+"/billing/checkout/"+r("billing.confirm","session",e.path.session)+"/confirm",auth:[["PalbaseBearer"]],answers:{200:"json"},idempotent:!0,headers:e.headers,signal:e.signal})},async cards(e){return t.send({op:"billing.cards",method:"GET",path:"/v1/orgs/"+r("billing.cards","id",e.path.id)+"/billing/cards",auth:[["PalbaseBearer"]],answers:{200:"json"},signal:e.signal})},async defaultCard(e){return t.send({op:"billing.defaultCard",method:"PUT",path:"/v1/orgs/"+r("billing.defaultCard","id",e.path.id)+"/billing/cards/"+r("billing.defaultCard","card",e.path.card)+"/default",auth:[["PalbaseBearer"]],answers:{200:"json"},idempotent:!0,headers:e.headers,signal:e.signal})},async removeCard(e){return t.send({op:"billing.removeCard",method:"DELETE",path:"/v1/orgs/"+r("billing.removeCard","id",e.path.id)+"/billing/cards/"+r("billing.removeCard","card",e.path.card),auth:[["PalbaseBearer"]],answers:{200:"json"},idempotent:!0,headers:e.headers,signal:e.signal})},async customer(e){return t.send({op:"billing.customer",method:"GET",path:"/v1/orgs/"+r("billing.customer","id",e.path.id)+"/billing/customer",auth:[["PalbaseBearer"]],answers:{200:"json"},signal:e.signal})},async setCustomer(e){return t.send({op:"billing.setCustomer",method:"PUT",path:"/v1/orgs/"+r("billing.setCustomer","id",e.path.id)+"/billing/customer",auth:[["PalbaseBearer"]],answers:{200:"json"},idempotent:!0,headers:e.headers,body:{kind:"json",contentType:"application/json",value:e.body},signal:e.signal})},async charges(e){return t.send({op:"billing.charges",method:"GET",path:"/v1/orgs/"+r("billing.charges","id",e.path.id)+"/billing/charges",auth:[["PalbaseBearer"]],answers:{200:"json"},query:e.query,signal:e.signal})},async csv(e){return t.send({op:"billing.csv",method:"GET",path:"/v1/orgs/"+r("billing.csv","id",e.path.id)+"/billing/charges.csv",auth:[["PalbaseBearer"]],answers:{},ownResponse:!0,query:e.query,signal:e.signal})},async invoices(e){return t.send({op:"billing.invoices",method:"GET",path:"/v1/orgs/"+r("billing.invoices","id",e.path.id)+"/billing/invoices",auth:[["PalbaseBearer"]],answers:{200:"json"},query:e.query,signal:e.signal})},async transfer(e){return t.send({op:"billing.transfer",method:"POST",path:"/v1/orgs/"+r("billing.transfer","id",e.path.id)+"/billing/transfers",auth:[["PalbaseBearer"]],answers:{200:"json"},idempotent:!0,headers:e.headers,body:{kind:"json",contentType:"application/json",value:e.body},signal:e.signal})},async environment(e){return t.send({op:"billing.environment",method:"GET",path:"/v1/orgs/"+r("billing.environment","id",e.path.id)+"/billing/environments/"+r("billing.environment","ref",e.path.ref),auth:[["PalbaseBearer"]],answers:{200:"json"},signal:e.signal})},async steer(e){return t.send({op:"billing.steer",method:"PATCH",path:"/v1/orgs/"+r("billing.steer","id",e.path.id)+"/billing/environments/"+r("billing.steer","ref",e.path.ref),auth:[["PalbaseBearer"]],answers:{200:"json"},idempotent:!0,headers:e.headers,body:{kind:"json",contentType:"application/json",value:e.body},signal:e.signal})},async topUp(e){return t.send({op:"billing.topUp",method:"POST",path:"/v1/orgs/"+r("billing.topUp","id",e.path.id)+"/billing/environments/"+r("billing.topUp","ref",e.path.ref)+"/topups",auth:[["PalbaseBearer"]],answers:{200:"json"},idempotent:!0,headers:e.headers,body:{kind:"json",contentType:"application/json",value:e.body},signal:e.signal})},async bankTransfer(e){return t.send({op:"billing.bankTransfer",method:"POST",path:"/v1/orgs/"+r("billing.bankTransfer","id",e.path.id)+"/billing/environments/"+r("billing.bankTransfer","ref",e.path.ref)+"/bank-transfers",auth:[["PalbaseBearer"]],answers:{200:"json"},idempotent:!0,headers:e.headers,body:{kind:"json",contentType:"application/json",value:e.body},signal:e.signal})},async ledger(e){return t.send({op:"billing.ledger",method:"GET",path:"/v1/orgs/"+r("billing.ledger","id",e.path.id)+"/billing/environments/"+r("billing.ledger","ref",e.path.ref)+"/ledger",auth:[["PalbaseBearer"]],answers:{200:"json"},query:e.query,signal:e.signal})}},accessRequests:{async request(e){return t.send({op:"accessRequests.request",method:"POST",path:"/v1/access-requests",auth:[["PalbaseBearer"],[]],answers:{200:"json"},idempotent:!0,headers:e.headers,body:{kind:"json",contentType:"application/json",value:e.body},signal:e.signal})}},docs:{async search(e){return t.send({op:"docs.search",method:"GET",path:"/v1/docs/search",auth:[["PalbaseBearer"],[]],answers:{200:"json"},query:e.query,signal:e.signal})}}}}function L(t){let{mint:e,revoke:i}=t;return async s=>{let g=await e(s),p=s.body?.role,l=s.body?.on_behalf_of;if(p===void 0&&l===void 0)return g;let d=g.data,o=[];if(p!==void 0&&d.role!==p&&o.push(`role ${p} (it came back ${d.role==null?"at its minter's":d.role})`),l!==void 0&&d.on_behalf_of!==l.trim()&&o.push("on_behalf_of"),o.length===0)return g;let n;try{await i({path:{ref:s.path.ref,id:String(d.id)}})}catch(m){n=m}let u=`Studio minted the token without the ${o.join(" and ")} asked for \u2014 it is older than this SDK`;throw new b({op:"environmentTokens.mint",status:0,code:"token_role_not_kept",message:n===void 0?`environmentTokens.mint: ${u}; the token (${d.id}) was revoked at once and is not returned \u2014 mint it again once Studio is updated`:`environmentTokens.mint: ${u}, and revoking it failed (${n instanceof Error?n.message:String(n)}) \u2014 revoke token ${d.id} of environment ${s.path.ref} yourself, now`,cause:n})}}var y={pbo_:"an organization's",pbe_:"an environment's"},z=/^[A-Za-z0-9_-]*$/,K=64,h=44;function O(t){if(typeof t!="string"||t==="")return"token is missing: pass an access token, an organization's (pbo_\u2026) or an environment's (pbe_\u2026)";let e=t.slice(0,4);if(!Object.hasOwn(y,e))return`token has the wrong prefix: an access token starts with pbo_ (an organization's) or pbe_ (an environment's)${/^pb_[a-z0-9]+_[cs]/.test(t)?" \u2014 a project key belongs in palbase/server or palbase/web":""}`;let i=t.slice(4);if(i.length!==K)return`token has the wrong length: ${y[e]} access token is ${e} and ${K} characters, this one has ${i.length} after it`;if(!z.test(i))return`token is not ${y[e]} access token: after ${e} come base64url characters alone (A\u2013Z, a\u2013z, 0\u20139, - and _)`;let s=N(i),g=(s[h]<<24|s[h+1]<<16|s[h+2]<<8|s[h+3])>>>0;if($(e,s.subarray(0,h))!==g)return"token's checksum does not match: it was mistyped or cut, or made before access tokens carried one \u2014 make a new token"}function H(t){return O(t)===void 0}function W(t){let e=O(t);if(e!==void 0)throw new TypeError(e)}var J="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";function N(t){let e=new Uint8Array(t.length*6/8),i=0,s=0,g=0;for(let p of t)i=i<<6|J.indexOf(p),s+=6,s>=8&&(s-=8,e[g++]=i>>s&255);return e}var V=(()=>{let t=new Uint32Array(256);for(let e=0;e<256;e++){let i=e;for(let s=0;s<8;s++)i=i&1?3988292384^i>>>1:i>>>1;t[e]=i>>>0}return t})();function $(t,e){let i=4294967295;for(let s=0;s<t.length;s++)i=V[(i^t.charCodeAt(s))&255]^i>>>8;for(let s of e)i=V[(i^s)&255]^i>>>8;return(i^4294967295)>>>0}var q="palbase.studio",X="palbase";function Y(){let t=globalThis;return typeof t.window<"u"||typeof t.document<"u"||typeof t.importScripts=="function"||I()}var _=class{domain;#e;#t=new Map;constructor(e){if(Y())throw new TypeError("palbase/cloud runs on a server: its access token opens the organization's projects, so it never goes into a browser, a web worker or a mobile app \u2014 keep it on your server, and have your app call that");W(e?.token);let i=e.domain??q;if(typeof i!="string"||!/^[a-z0-9-]+(\.[a-z0-9-]+)+$/.test(i))throw new TypeError(`domain ${JSON.stringify(i)} is not a domain`);this.domain=i;let s=e.token;this.#e=p=>G(f({baseUrl:p,credentials:{token:s},fetch:e.fetch,solveProofOfWork:!1}),e.retry??D);let g=M(this.#e(`https://palbase.app.${i}`));g.environmentTokens.mint=L(g.environmentTokens),Object.assign(this,g)}project(e){if(typeof e!="string"||!/^[a-z0-9]{1,63}$/.test(e))throw new TypeError(`${JSON.stringify(e)} is not an environment's ref`);let i=this.#t.get(e);return i||(i=B(this.#e(e===X?`https://connect.${this.domain}`:`https://${e}.${this.domain}`)),this.#t.set(e,i)),i}};export{q as DEFAULT_DOMAIN,_ as PalbaseCloud,b as PalbaseError,H as tokenIsWellFormed};
|
|
1
|
+
/*! palbase 0.23.1 — Palbase SDK License (see LICENSE) */
|
|
2
|
+
import{a as I}from"../chunks/QY4VHBSI.js";import{a as v,b as P,c as k,e as A,f as T,g as C,h as w,i as S,j as R,k as j,l as E,m as x,n as U}from"../chunks/G3XVTFYH.js";import{a as D,b as G}from"../chunks/KQSO62BH.js";import{b,c as r,d as f}from"../chunks/BB57HGRH.js";import"../chunks/D6PLSRTA.js";import"../chunks/OLYFCCY7.js";function B(t){let e=v.client(t),i=P.client(t),s=k.client(t),g=A.client(t),p=T.client(t),l=C.client(t),d=w.client(t),o=S.client(t),n=R.client(t),u=j.client(t),m=E.client(t),c=x.client(t),a=U.client(t);return{ai:{draftAgent:e.draftAgent,listAgents:e.listAgents,getAgent:e.getAgent,putAgent:e.putAgent,deleteAgent:e.deleteAgent,publishAgent:e.publishAgent,rollbackAgent:e.rollbackAgent,listAgentVersions:e.listAgentVersions,listChats:e.listChats,createChat:e.createChat,getChat:e.getChat,deleteChat:e.deleteChat,decideChatApproval:e.decideChatApproval,forkChat:e.forkChat,getChatGoal:e.getChatGoal,setChatGoal:e.setChatGoal,clearChatGoal:e.clearChatGoal,updateChatGoal:e.updateChatGoal,putChatMember:e.putChatMember,deleteChatMember:e.deleteChatMember,listChatMessages:e.listChatMessages,sendChatMessage:e.sendChatMessage,getChatMessageAttachment:e.getChatMessageAttachment,listChatParts:e.listChatParts,putChatPipe:e.putChatPipe,deleteChatPipe:e.deleteChatPipe,sendSubagentMessage:e.sendSubagentMessage,stopSubagent:e.stopSubagent,stopChat:e.stopChat,listTurnToolCalls:e.listTurnToolCalls,getChatToolCall:e.getChatToolCall,answerChatToolCall:e.answerChatToolCall,listChatTurnArtifacts:e.listChatTurnArtifacts,getChatTurnArtifact:e.getChatTurnArtifact,getChatTurnCost:e.getChatTurnCost,startChatVoice:e.startChatVoice,getChatVoice:e.getChatVoice,closeChatVoice:e.closeChatVoice,commandChatVoice:e.commandChatVoice,getChatWorkspaceFile:e.getChatWorkspaceFile,addChatWorkspaceRepo:e.addChatWorkspaceRepo,createEmbeddings:e.createEmbeddings,listEndpoints:e.listEndpoints,putEndpoint:e.putEndpoint,deleteEndpoint:e.deleteEndpoint,createImage:e.createImage,getImage:e.getImage,getImageFile:e.getImageFile,listModels:e.listModels,listProviders:e.listProviders,connectProvider:e.connectProvider,disconnectProvider:e.disconnectProvider,listRepos:e.listRepos,putRepo:e.putRepo,deleteRepo:e.deleteRepo,createResponse:e.createResponse,getResponse:e.getResponse,cancelResponse:e.cancelResponse,followResponse:e.followResponse,getSettings:e.getSettings,putSettings:e.putSettings,getSpend:e.getSpend,askSupport:e.askSupport,listTools:e.listTools,listUsage:e.listUsage},analytics:{listAudiences:i.listAudiences,createAudience:i.createAudience,previewAudience:i.previewAudience,getAudience:i.getAudience,deleteAudience:i.deleteAudience,updateAudience:i.updateAudience,listAudienceMembers:i.listAudienceMembers,alias:i.alias,batch:i.batch,getEventBreakdown:i.getEventBreakdown,capture:i.capture,sendConsoleHistory:i.sendConsoleHistory,getConsoleConfig:i.getConsoleConfig,listConsoleRecords:i.listConsoleRecords,listEventNames:i.listEventNames,listEvents:i.listEvents,getEventTimeline:i.getEventTimeline,runFunnel:i.runFunnel,identify:i.identify,page:i.page,sendPerf:i.sendPerf,listPerfGroups:i.listPerfGroups,getPerfConfig:i.getPerfConfig,getPerfTimeline:i.getPerfTimeline,listRequestLines:i.listRequestLines,getMachineTraffic:i.getMachineTraffic,runRetention:i.runRetention,screen:i.screen,getSettings:i.getSettings,putSettings:i.putSettings,getSummary:i.getSummary,listTraces:i.listTraces,sendTrace:i.sendTrace,sendTraceBatch:i.sendTraceBatch,getTraceHops:i.getTraceHops,listSessionTraces:i.listSessionTraces,getTraceSummary:i.getTraceSummary,getTraceTimeline:i.getTraceTimeline,searchPeople:i.searchPeople,setPersonProperties:i.setPersonProperties,getPerson:i.getPerson,listPersonEvents:i.listPersonEvents,getEventCatalog:i.getEventCatalog,defineEvent:i.defineEvent},auth:{adminVerifyDeviceAssertion:s.adminVerifyDeviceAssertion,adminGetAttestPolicy:s.adminGetAttestPolicy,adminGetAttestObservations:s.adminGetAttestObservations,adminRecordAttestObservations:s.adminRecordAttestObservations,adminListAuditEvents:s.adminListAuditEvents,adminExportAuditEvents:s.adminExportAuditEvents,adminVerifyAuditTrail:s.adminVerifyAuditTrail,adminGetAuthSettings:s.adminGetAuthSettings,adminUpdateAuthSettings:s.adminUpdateAuthSettings,adminGetBreachWatch:s.adminGetBreachWatch,adminListHooks:s.adminListHooks,adminCreateHook:s.adminCreateHook,adminUpdateHook:s.adminUpdateHook,adminDeleteHook:s.adminDeleteHook,adminListHookExecutions:s.adminListHookExecutions,adminListIntegrations:s.adminListIntegrations,adminPutIntegration:s.adminPutIntegration,adminDeleteIntegration:s.adminDeleteIntegration,adminListOAuthClients:s.adminListOAuthClients,adminCreateOAuthClient:s.adminCreateOAuthClient,adminGetOAuthClient:s.adminGetOAuthClient,adminDeleteOAuthClient:s.adminDeleteOAuthClient,adminUpdateOAuthClient:s.adminUpdateOAuthClient,adminListProviders:s.adminListProviders,adminGetPhoneSettings:s.adminGetPhoneSettings,adminUpdatePhoneSettings:s.adminUpdatePhoneSettings,adminToggleProvider:s.adminToggleProvider,adminListRoles:s.adminListRoles,adminUpsertRole:s.adminUpsertRole,adminDeleteRole:s.adminDeleteRole,adminListServiceAccounts:s.adminListServiceAccounts,adminCreateServiceAccount:s.adminCreateServiceAccount,adminGetServiceAccount:s.adminGetServiceAccount,adminRevokeServiceAccount:s.adminRevokeServiceAccount,adminRotateServiceAccount:s.adminRotateServiceAccount,adminListSessions:s.adminListSessions,adminRevokeSession:s.adminRevokeSession,adminListSigningKeys:s.adminListSigningKeys,adminRotateSigningKey:s.adminRotateSigningKey,socialAdminConfig:s.socialAdminConfig,socialCredentialPut:s.socialCredentialPut,socialCredentialDelete:s.socialCredentialDelete,socialProviderPatch:s.socialProviderPatch,adminGetStats:s.adminGetStats,adminSendTestTemplate:s.adminSendTestTemplate,adminListTestUsers:s.adminListTestUsers,adminCreateTestUsers:s.adminCreateTestUsers,adminSetTestUserPhone:s.adminSetTestUserPhone,adminDeleteTestUser:s.adminDeleteTestUser,adminCreateCustomToken:s.adminCreateCustomToken,adminListUsers:s.adminListUsers,adminCreateUser:s.adminCreateUser,adminImportUsers:s.adminImportUsers,adminGetUser:s.adminGetUser,adminDeleteUser:s.adminDeleteUser,adminUpdateUser:s.adminUpdateUser,adminBanUser:s.adminBanUser,adminGetUserConsents:s.adminGetUserConsents,adminRevokeUserCredentials:s.adminRevokeUserCredentials,adminExportUser:s.adminExportUser,adminListUserMfaFactors:s.adminListUserMfaFactors,adminResetUserMfa:s.adminResetUserMfa,adminResetUserPassword:s.adminResetUserPassword,adminListUserRoles:s.adminListUserRoles,adminAssignUserRole:s.adminAssignUserRole,adminRevokeUserRole:s.adminRevokeUserRole,adminRevokeUserSessions:s.adminRevokeUserSessions,adminUnbanUser:s.adminUnbanUser,adminGetInstallationConsents:s.adminGetInstallationConsents,adminRefuseConsents:s.adminRefuseConsents},flags:{getValues:g.getValues,batchUserValues:g.batchUserValues,getDelta:g.getDelta,getEvaluations:g.getEvaluations,listExperiments:g.listExperiments,startExperiment:g.startExperiment,getExperiment:g.getExperiment,getExperimentResults:g.getExperimentResults,stopExperiment:g.stopExperiment,declareExperimentWinner:g.declareExperimentWinner,getCurrentInstallations:g.getCurrentInstallations,getInstallationsDaily:g.getInstallationsDaily,getSnapshot:g.getSnapshot,listDefinitions:g.listDefinitions,getDefinition:g.getDefinition,putDefinition:g.putDefinition,deleteDefinition:g.deleteDefinition,activateTemplates:g.activateTemplates,getActiveTemplate:g.getActiveTemplate,getTemplateCapabilities:g.getTemplateCapabilities,getTemplateDraft:g.getTemplateDraft,createTemplateDraft:g.createTemplateDraft,discardTemplateDraft:g.discardTemplateDraft,putTemplateParameter:g.putTemplateParameter,removeTemplateParameter:g.removeTemplateParameter,reviewTemplateDraft:g.reviewTemplateDraft,publishTemplate:g.publishTemplate,getPublishReceipt:g.getPublishReceipt,restoreTemplateVersion:g.restoreTemplateVersion,listTemplateVersions:g.listTemplateVersions,getTemplateVersion:g.getTemplateVersion,getUserValues:g.getUserValues,putUserValues:g.putUserValues,deleteUserValues:g.deleteUserValues,putUserValue:g.putUserValue,deleteUserValue:g.deleteUserValue},journeys:{listJourneys:p.listJourneys,createJourney:p.createJourney,listPersonRuns:p.listPersonRuns,simulateJourney:p.simulateJourney,validateJourney:p.validateJourney,getJourney:p.getJourney,updateJourney:p.updateJourney,deleteJourney:p.deleteJourney,copyJourney:p.copyJourney,publishJourney:p.publishJourney,listJourneyRuns:p.listJourneyRuns,getJourneyStats:p.getJourneyStats,stopJourney:p.stopJourney,testJourney:p.testJourney},machines:{listMachines:l.listMachines,createMachine:l.createMachine,listMachineSizes:l.listMachineSizes,getMachineNetwork:l.getMachineNetwork,connectGitHub:l.connectGitHub,listInstallations:l.listInstallations,linkInstallation:l.linkInstallation,shareInstallation:l.shareInstallation,unlinkInstallation:l.unlinkInstallation,listRepositories:l.listRepositories,getMachine:l.getMachine,deleteMachine:l.deleteMachine,updateMachine:l.updateMachine,listBuilds:l.listBuilds,deployMachine:l.deployMachine,getBuild:l.getBuild,getBuildLog:l.getBuildLog,rollbackMachine:l.rollbackMachine,listDatabases:l.listDatabases,createDatabase:l.createDatabase,listDatabaseSizes:l.listDatabaseSizes,getDatabase:l.getDatabase,deleteDatabase:l.deleteDatabase,updateDatabase:l.updateDatabase,undeleteDatabase:l.undeleteDatabase,purgeDatabase:l.purgeDatabase,getDatabaseCredentials:l.getDatabaseCredentials,changeDatabasePassword:l.changeDatabasePassword,readMachineLogs:l.readMachineLogs,getMachineMetrics:l.getMachineMetrics,getMachineContract:l.getMachineContract,restoreDatabase:l.restoreDatabase,getDatabaseSchema:l.getDatabaseSchema,getDatabaseMetrics:l.getDatabaseMetrics,queryDatabase:l.queryDatabase,listCrons:l.listCrons,listCronRuns:l.listCronRuns,runCron:l.runCron,pauseCron:l.pauseCron,resumeCron:l.resumeCron,listTasks:l.listTasks,enqueueTask:l.enqueueTask,getTask:l.getTask,cancelTask:l.cancelTask,retryTask:l.retryTask,listTaskTypes:l.listTaskTypes,makeTemplatedTestUsers:l.makeTemplatedTestUsers,templateTestUser:l.templateTestUser,deleteTemplatedTestUser:l.deleteTemplatedTestUser},messaging:{adminAccessLog:d.adminAccessLog,adminListConversations:d.adminListConversations,adminCreateConversation:d.adminCreateConversation,adminGetConversation:d.adminGetConversation,adminDeleteConversation:d.adminDeleteConversation,adminAddMembers:d.adminAddMembers,adminRemoveMember:d.adminRemoveMember,adminListMessages:d.adminListMessages,adminSendMessage:d.adminSendMessage,adminDeleteMessage:d.adminDeleteMessage,adminFileUrl:d.adminFileUrl,adminPutProfile:d.adminPutProfile,adminListReports:d.adminListReports,adminGetReport:d.adminGetReport,adminReportFileUrl:d.adminReportFileUrl,adminResolveReport:d.adminResolveReport,getSettings:d.getSettings,putSettings:d.putSettings,rotateHookSecret:d.rotateHookSecret},notify:{getDeliverability:o.getDeliverability,listDevices:o.listDevices,getDeviceStats:o.getDeviceStats,deleteMyDevice:o.deleteMyDevice,sendEmail:o.sendEmail,listInAppCampaigns:o.listInAppCampaigns,createInAppCampaign:o.createInAppCampaign,getInAppCampaign:o.getInAppCampaign,putInAppCampaign:o.putInAppCampaign,deleteInAppCampaign:o.deleteInAppCampaign,getInAppCampaignStats:o.getInAppCampaignStats,listInAppTemplates:o.listInAppTemplates,sendInbox:o.sendInbox,listInboxMessages:o.listInboxMessages,listNotifyMessages:o.listNotifyMessages,getNotifyMessage:o.getNotifyMessage,cancelMessage:o.cancelMessage,getMetricsSummary:o.getMetricsSummary,listNotifyProviders:o.listNotifyProviders,putNotifyProvider:o.putNotifyProvider,deleteNotifyProvider:o.deleteNotifyProvider,sendPush:o.sendPush,getNotifySettings:o.getNotifySettings,putNotifySettings:o.putNotifySettings,sendSms:o.sendSms,listEmailTemplates:o.listEmailTemplates,getEmailTemplate:o.getEmailTemplate,putEmailTemplate:o.putEmailTemplate,deleteEmailTemplate:o.deleteEmailTemplate,listPushTemplates:o.listPushTemplates,getPushTemplate:o.getPushTemplate,putPushTemplate:o.putPushTemplate,deletePushTemplate:o.deletePushTemplate,listSmsTemplates:o.listSmsTemplates,getSmsTemplate:o.getSmsTemplate,putSmsTemplate:o.putSmsTemplate,deleteSmsTemplate:o.deleteSmsTemplate,listWhatsAppTemplates:o.listWhatsAppTemplates,getWhatsAppTemplate:o.getWhatsAppTemplate,putWhatsAppTemplate:o.putWhatsAppTemplate,deleteWhatsAppTemplate:o.deleteWhatsAppTemplate,listTopics:o.listTopics,createTopic:o.createTopic,deleteTopic:o.deleteTopic,changeTopic:o.changeTopic,addTopicSubscribers:o.addTopicSubscribers,removeTopicSubscriber:o.removeTopicSubscriber,listUserDevices:o.listUserDevices,getUserPreferences:o.getUserPreferences,setUserPreferences:o.setUserPreferences,startVerification:o.startVerification,checkVerification:o.checkVerification,getWebPushStatus:o.getWebPushStatus,sendWhatsApp:o.sendWhatsApp,listWhatsAppInbound:o.listWhatsAppInbound},purchases:{getAppleAccount:n.getAppleAccount,disconnectApple:n.disconnectApple,createAppleGrant:n.createAppleGrant,getAppleReadiness:n.getAppleReadiness,setXcodeCertificate:n.setXcodeCertificate,clearXcodeCertificate:n.clearXcodeCertificate,getGoogleAccount:n.getGoogleAccount,connectGoogle:n.connectGoogle,disconnectGoogle:n.disconnectGoogle,getCatalog:n.getCatalog,saveCatalog:n.saveCatalog,planCatalog:n.planCatalog,getCatalogPlan:n.getCatalogPlan,confirmCatalogPlan:n.confirmCatalogPlan,declineCatalogPlan:n.declineCatalogPlan,validateCatalog:n.validateCatalog,listCharts:n.listCharts,getChartsOverview:n.getChartsOverview,getChart:n.getChart,getCustomer:n.getCustomer,grantCredits:n.grantCredits,listCreditEntries:n.listCreditEntries,forgiveCredits:n.forgiveCredits,listCustomerGrants:n.listCustomerGrants,grantEntitlement:n.grantEntitlement,revokeGrant:n.revokeGrant,holdSpend:n.holdSpend,setCustomerLimit:n.setCustomerLimit,clearCustomerLimit:n.clearCustomerLimit,grantLimit:n.grantLimit,spend:n.spend,commitSpend:n.commitSpend,extendHold:n.extendHold,releaseSpend:n.releaseSpend,reverseSpend:n.reverseSpend,listExperiments:n.listExperiments,startExperiment:n.startExperiment,getExperiment:n.getExperiment,getExperimentResults:n.getExperimentResults,stopExperiment:n.stopExperiment,declareExperimentWinner:n.declareExperimentWinner,getOfferings:n.getOfferings,listPaywalls:n.listPaywalls,createPaywall:n.createPaywall,listPaywallAssets:n.listPaywallAssets,registerPaywallAsset:n.registerPaywallAsset,deletePaywallAsset:n.deletePaywallAsset,listPaywallTemplates:n.listPaywallTemplates,getPaywallTemplateAsset:n.getPaywallTemplateAsset,validatePaywall:n.validatePaywall,getPaywall:n.getPaywall,deletePaywall:n.deletePaywall,savePaywallDraft:n.savePaywallDraft,publishPaywall:n.publishPaywall,listPaywallVersions:n.listPaywallVersions,getPaywallVersion:n.getPaywallVersion,listPlacements:n.listPlacements,listAttributeKeys:n.listAttributeKeys,setPlacement:n.setPlacement,deletePlacement:n.deletePlacement,recordPaywallExposure:n.recordPaywallExposure,getPlacementPaywall:n.getPlacementPaywall,previewPlacement:n.previewPlacement,getPlacementResults:n.getPlacementResults,getPlacementRules:n.getPlacementRules,setPlacementRules:n.setPlacementRules,getSettings:n.getSettings,updateSettings:n.updateSettings,getStripeAccount:n.getStripeAccount,disconnectStripe:n.disconnectStripe,checkStripeAccount:n.checkStripeAccount,createCheckout:n.createCheckout,createCheckoutRedemption:n.createCheckoutRedemption,createStripeGrant:n.createStripeGrant,createStripeAppInstall:n.createStripeAppInstall,getOfferStats:n.getOfferStats,listCoupons:n.listCoupons,createCoupon:n.createCoupon,getCoupon:n.getCoupon,revokeCoupon:n.revokeCoupon,listCouponCodes:n.listCouponCodes,setXcodeOfferKey:n.setXcodeOfferKey,searchCustomers:n.searchCustomers,getCustomerHistory:n.getCustomerHistory,listCatalogRevisions:n.listCatalogRevisions,getCatalogRevision:n.getCatalogRevision,restoreCatalogRevision:n.restoreCatalogRevision,extendSubscription:n.extendSubscription,refundSubscription:n.refundSubscription,cancelSubscription:n.cancelSubscription},realtime:{broadcast:u.broadcast,getChannels:u.getChannels,putChannels:u.putChannels,getLimits:u.getLimits,putLimits:u.putLimits,revalidate:u.revalidate,writeState:u.writeState,getStats:u.getStats},secrets:{listSecretAudit:m.listSecretAudit,listFieldKeys:m.listFieldKeys,getFieldKeys:m.getFieldKeys,openFields:m.openFields,sealPlaceholder:m.sealPlaceholder,rotateFieldKeys:m.rotateFieldKeys,listTransitKeys:m.listTransitKeys,getTransitKeys:m.getTransitKeys,getTransitPublicKeys:m.getTransitPublicKeys,rotateTransitKeys:m.rotateTransitKeys,retireTransitKey:m.retireTransitKey,listSecrets:m.listSecrets,getEnvironmentValues:m.getEnvironmentValues,getSecret:m.getSecret,putSecret:m.putSecret,deleteSecret:m.deleteSecret,rollbackSecret:m.rollbackSecret,listSecretVersions:m.listSecretVersions},storage:{listBuckets:c.listBuckets,getBucket:c.getBucket,putBucket:c.putBucket,deleteBucket:c.deleteBucket,copyObject:c.copyObject,moveObject:c.moveObject,listObjects:c.listObjects,getObject:c.getObject,putObject:c.putObject,deleteObject:c.deleteObject,headObject:c.headObject,createSignedUrl:c.createSignedUrl,createUploadUrl:c.createUploadUrl,getStorageStats:c.getStorageStats},stores:{listActions:a.listActions,getAction:a.getAction,confirmAction:a.confirmAction,declineAction:a.declineAction,getAppleAccount:a.getAppleAccount,disconnectApple:a.disconnectApple,checkAppleAccount:a.checkAppleAccount,createAppleGrant:a.createAppleGrant,getSandboxReadiness:a.getSandboxReadiness,listSandboxTesters:a.listSandboxTesters,clearSandboxPurchaseHistory:a.clearSandboxPurchaseHistory,updateSandboxTester:a.updateSandboxTester,listApps:a.listApps,listFeedback:a.listFeedback,getFeedback:a.getFeedback,listGroups:a.listGroups,createGroup:a.createGroup,linkApp:a.linkApp,getListing:a.getListing,setListing:a.setListing,planListing:a.planListing,createPackage:a.createPackage,uploadScreenshot:a.uploadScreenshot,getReviewInfo:a.getReviewInfo,setReviewInfo:a.setReviewInfo,getUploadKey:a.getUploadKey,getAppStoreVersion:a.getAppStoreVersion,prepareAppStoreVersion:a.prepareAppStoreVersion,planPhasedRelease:a.planPhasedRelease,planReleaseVersion:a.planReleaseVersion,planSubmitReview:a.planSubmitReview,planWithdrawReview:a.planWithdrawReview,getAppVitals:a.getAppVitals,getAppWebhook:a.getAppWebhook,makeAppWebhook:a.makeAppWebhook,pingAppWebhook:a.pingAppWebhook,getGoogleAccount:a.getGoogleAccount,connectGoogle:a.connectGoogle,disconnectGoogle:a.disconnectGoogle,checkGoogleAccount:a.checkGoogleAccount,deleteGroup:a.deleteGroup,renameGroup:a.renameGroup,addGroupBuild:a.addGroupBuild,listTesters:a.listTesters,setTesters:a.setTesters,listPackages:a.listPackages,getPackage:a.getPackage,planBetaReview:a.planBetaReview,listDeliveries:a.listDeliveries,deliver:a.deliver,getSignedBundleLink:a.getSignedBundleLink,planExpire:a.planExpire,planExportCompliance:a.planExportCompliance,setWhatToTest:a.setWhatToTest,getAppleSession:a.getAppleSession,disconnectAppleSession:a.disconnectAppleSession,checkAppleSession:a.checkAppleSession,createAppleIdGrant:a.createAppleIdGrant,getAppReview:a.getAppReview,getReviewAttachment:a.getReviewAttachment,setReviewDraft:a.setReviewDraft,sendReviewDraft:a.sendReviewDraft,getAppPrivacy:a.getAppPrivacy,setAppPrivacy:a.setAppPrivacy,makeAppRecord:a.makeAppRecord,removeAppRecord:a.removeAppRecord,listMadeAppleKeys:a.listMadeAppleKeys,makeAppleKey:a.makeAppleKey,revokeMadeAppleKey:a.revokeMadeAppleKey,shareAppleSession:a.shareAppleSession,unshareAppleSession:a.unshareAppleSession}}}function M(t){return{orgs:{async list(e){return t.send({op:"orgs.list",method:"GET",path:"/v1/orgs",auth:[["PalbaseBearer"]],answers:{200:"json"},signal:e?.signal})},async get(e){return t.send({op:"orgs.get",method:"GET",path:"/v1/orgs/"+r("orgs.get","id",e.path.id),auth:[["PalbaseBearer"]],answers:{200:"json"},signal:e.signal})},async members(e){return t.send({op:"orgs.members",method:"GET",path:"/v1/orgs/"+r("orgs.members","id",e.path.id)+"/members",auth:[["PalbaseBearer"]],answers:{200:"json"},signal:e.signal})},async auditLog(e){return t.send({op:"orgs.auditLog",method:"GET",path:"/v1/orgs/"+r("orgs.auditLog","id",e.path.id)+"/audit",auth:[["PalbaseBearer"]],answers:{200:"json"},query:e.query,signal:e.signal})}},invitations:{async mine(e){return t.send({op:"invitations.mine",method:"GET",path:"/v1/invitations",auth:[["PalbaseBearer"]],answers:{200:"json"},signal:e?.signal})},async accept(e){return t.send({op:"invitations.accept",method:"POST",path:"/v1/invitations/"+r("invitations.accept","id",e.path.id)+"/accept",auth:[["PalbaseBearer"]],answers:{200:"json"},idempotent:!0,headers:e.headers,signal:e.signal})}},orgWebhooks:{async list(e){return t.send({op:"orgWebhooks.list",method:"GET",path:"/v1/orgs/"+r("orgWebhooks.list","id",e.path.id)+"/webhooks",auth:[["PalbaseBearer"]],answers:{200:"json"},signal:e.signal})},async add(e){return t.send({op:"orgWebhooks.add",method:"POST",path:"/v1/orgs/"+r("orgWebhooks.add","id",e.path.id)+"/webhooks",auth:[["PalbaseBearer"]],answers:{200:"json"},idempotent:!0,headers:e.headers,body:{kind:"json",contentType:"application/json",value:e.body},signal:e.signal})},async remove(e){return t.send({op:"orgWebhooks.remove",method:"DELETE",path:"/v1/orgs/"+r("orgWebhooks.remove","id",e.path.id)+"/webhooks/"+r("orgWebhooks.remove","endpoint",e.path.endpoint),auth:[["PalbaseBearer"]],answers:{204:"empty"},idempotent:!0,headers:e.headers,signal:e.signal})}},projects:{async mine(e){return t.send({op:"projects.mine",method:"GET",path:"/v1/projects",auth:[["PalbaseBearer"]],answers:{200:"json"},signal:e?.signal})},async environmentsMine(e){return t.send({op:"projects.environmentsMine",method:"GET",path:"/v1/environments",auth:[["PalbaseBearer"]],answers:{200:"json"},signal:e?.signal})},async list(e){return t.send({op:"projects.list",method:"GET",path:"/v1/orgs/"+r("projects.list","id",e.path.id)+"/projects",auth:[["PalbaseBearer"]],answers:{200:"json"},signal:e.signal})},async create(e){return t.send({op:"projects.create",method:"POST",path:"/v1/orgs/"+r("projects.create","id",e.path.id)+"/projects",auth:[["PalbaseBearer"]],answers:{200:"json"},idempotent:!0,headers:e.headers,body:{kind:"json",contentType:"application/json",value:e.body},signal:e.signal})},async get(e){return t.send({op:"projects.get",method:"GET",path:"/v1/projects/"+r("projects.get","id",e.path.id),auth:[["PalbaseBearer"]],answers:{200:"json"},signal:e.signal})},async remove(e){return t.send({op:"projects.remove",method:"DELETE",path:"/v1/projects/"+r("projects.remove","id",e.path.id),auth:[["PalbaseBearer"]],answers:{204:"empty"},idempotent:!0,query:e.query,headers:e.headers,signal:e.signal})},async rename(e){return t.send({op:"projects.rename",method:"PATCH",path:"/v1/projects/"+r("projects.rename","id",e.path.id),auth:[["PalbaseBearer"]],answers:{200:"json"},idempotent:!0,headers:e.headers,body:{kind:"json",contentType:"application/json",value:e.body},signal:e.signal})},async addEnvironment(e){return t.send({op:"projects.addEnvironment",method:"POST",path:"/v1/projects/"+r("projects.addEnvironment","id",e.path.id)+"/environments",auth:[["PalbaseBearer"]],answers:{200:"json"},idempotent:!0,headers:e.headers,body:{kind:"json",contentType:"application/json",value:e.body},signal:e.signal})},async environment(e){return t.send({op:"projects.environment",method:"GET",path:"/v1/environments/"+r("projects.environment","ref",e.path.ref),auth:[["PalbaseBearer"]],answers:{200:"json"},signal:e.signal})},async removeEnvironment(e){return t.send({op:"projects.removeEnvironment",method:"DELETE",path:"/v1/environments/"+r("projects.removeEnvironment","ref",e.path.ref),auth:[["PalbaseBearer"]],answers:{204:"empty"},idempotent:!0,query:e.query,headers:e.headers,signal:e.signal})},async renameEnvironment(e){return t.send({op:"projects.renameEnvironment",method:"PATCH",path:"/v1/environments/"+r("projects.renameEnvironment","ref",e.path.ref),auth:[["PalbaseBearer"]],answers:{200:"json"},idempotent:!0,headers:e.headers,body:{kind:"json",contentType:"application/json",value:e.body},signal:e.signal})},async keys(e){return t.send({op:"projects.keys",method:"GET",path:"/v1/environments/"+r("projects.keys","ref",e.path.ref)+"/keys",auth:[["PalbaseBearer"]],answers:{200:"json"},signal:e.signal})},async usage(e){return t.send({op:"projects.usage",method:"GET",path:"/v1/environments/"+r("projects.usage","ref",e.path.ref)+"/usage",auth:[["PalbaseBearer"]],answers:{200:"json"},query:e.query,signal:e.signal})},async personalKey(e){return t.send({op:"projects.personalKey",method:"POST",path:"/v1/environments/"+r("projects.personalKey","ref",e.path.ref)+"/personal-key",auth:[["PalbaseBearer"]],answers:{200:"json"},idempotent:!0,headers:e.headers,body:{kind:"json",contentType:"application/json",value:e.body},signal:e.signal})},async revokePersonalKey(e){return t.send({op:"projects.revokePersonalKey",method:"DELETE",path:"/v1/environments/"+r("projects.revokePersonalKey","ref",e.path.ref)+"/personal-key/"+r("projects.revokePersonalKey","key",e.path.key),auth:[["PalbaseBearer"]],answers:{204:"empty"},idempotent:!0,headers:e.headers,signal:e.signal})},async shareInstallation(e){return t.send({op:"projects.shareInstallation",method:"POST",path:"/v1/environments/"+r("projects.shareInstallation","ref",e.path.ref)+"/github/installations",auth:[["PalbaseBearer"]],answers:{},ownResponse:!0,idempotent:!0,headers:e.headers,body:{kind:"json",contentType:"application/json",value:e.body},signal:e.signal})}},apps:{async list(e){return t.send({op:"apps.list",method:"GET",path:"/v1/projects/"+r("apps.list","id",e.path.id)+"/apps",auth:[["PalbaseBearer"]],answers:{200:"json"},signal:e.signal})},async create(e){return t.send({op:"apps.create",method:"POST",path:"/v1/projects/"+r("apps.create","id",e.path.id)+"/apps",auth:[["PalbaseBearer"]],answers:{200:"json"},idempotent:!0,headers:e.headers,body:{kind:"json",contentType:"application/json",value:e.body},signal:e.signal})},async get(e){return t.send({op:"apps.get",method:"GET",path:"/v1/projects/"+r("apps.get","id",e.path.id)+"/apps/"+r("apps.get","app",e.path.app),auth:[["PalbaseBearer"]],answers:{200:"json"},signal:e.signal})},async remove(e){return t.send({op:"apps.remove",method:"DELETE",path:"/v1/projects/"+r("apps.remove","id",e.path.id)+"/apps/"+r("apps.remove","app",e.path.app),auth:[["PalbaseBearer"]],answers:{200:"json"},idempotent:!0,headers:e.headers,signal:e.signal})},async update(e){return t.send({op:"apps.update",method:"PATCH",path:"/v1/projects/"+r("apps.update","id",e.path.id)+"/apps/"+r("apps.update","app",e.path.app),auth:[["PalbaseBearer"]],answers:{200:"json"},idempotent:!0,headers:e.headers,body:{kind:"json",contentType:"application/json",value:e.body},signal:e.signal})},async restore(e){return t.send({op:"apps.restore",method:"POST",path:"/v1/projects/"+r("apps.restore","id",e.path.id)+"/apps/"+r("apps.restore","app",e.path.app)+"/restore",auth:[["PalbaseBearer"]],answers:{200:"json"},idempotent:!0,headers:e.headers,signal:e.signal})},async setIn(e){return t.send({op:"apps.setIn",method:"PUT",path:"/v1/environments/"+r("apps.setIn","ref",e.path.ref)+"/apps/"+r("apps.setIn","app",e.path.app),auth:[["PalbaseBearer"]],answers:{200:"json"},idempotent:!0,headers:e.headers,body:{kind:"json",contentType:"application/json",value:e.body},signal:e.signal})},async removeFrom(e){return t.send({op:"apps.removeFrom",method:"DELETE",path:"/v1/environments/"+r("apps.removeFrom","ref",e.path.ref)+"/apps/"+r("apps.removeFrom","app",e.path.app),auth:[["PalbaseBearer"]],answers:{204:"empty"},idempotent:!0,headers:e.headers,signal:e.signal})},async config(e){return t.send({op:"apps.config",method:"GET",path:"/v1/environments/"+r("apps.config","ref",e.path.ref)+"/apps/"+r("apps.config","app",e.path.app)+"/config",auth:[["PalbaseBearer"]],answers:{200:"json"},signal:e.signal})}},snippets:{async list(e){return t.send({op:"snippets.list",method:"GET",path:"/v1/environments/"+r("snippets.list","ref",e.path.ref)+"/snippets",auth:[["PalbaseBearer"]],answers:{200:"json"},signal:e.signal})},async create(e){return t.send({op:"snippets.create",method:"POST",path:"/v1/environments/"+r("snippets.create","ref",e.path.ref)+"/snippets",auth:[["PalbaseBearer"]],answers:{200:"json"},idempotent:!0,headers:e.headers,body:{kind:"json",contentType:"application/json",value:e.body},signal:e.signal})},async remove(e){return t.send({op:"snippets.remove",method:"DELETE",path:"/v1/environments/"+r("snippets.remove","ref",e.path.ref)+"/snippets/"+r("snippets.remove","id",e.path.id),auth:[["PalbaseBearer"]],answers:{204:"empty"},idempotent:!0,headers:e.headers,signal:e.signal})},async change(e){return t.send({op:"snippets.change",method:"PATCH",path:"/v1/environments/"+r("snippets.change","ref",e.path.ref)+"/snippets/"+r("snippets.change","id",e.path.id),auth:[["PalbaseBearer"]],answers:{200:"json"},idempotent:!0,headers:e.headers,body:{kind:"json",contentType:"application/json",value:e.body},signal:e.signal})}},chartViews:{async list(e){return t.send({op:"chartViews.list",method:"GET",path:"/v1/environments/"+r("chartViews.list","ref",e.path.ref)+"/chart-views",auth:[["PalbaseBearer"]],answers:{200:"json"},signal:e.signal})},async create(e){return t.send({op:"chartViews.create",method:"POST",path:"/v1/environments/"+r("chartViews.create","ref",e.path.ref)+"/chart-views",auth:[["PalbaseBearer"]],answers:{200:"json"},idempotent:!0,headers:e.headers,body:{kind:"json",contentType:"application/json",value:e.body},signal:e.signal})},async remove(e){return t.send({op:"chartViews.remove",method:"DELETE",path:"/v1/environments/"+r("chartViews.remove","ref",e.path.ref)+"/chart-views/"+r("chartViews.remove","id",e.path.id),auth:[["PalbaseBearer"]],answers:{204:"empty"},idempotent:!0,headers:e.headers,signal:e.signal})},async change(e){return t.send({op:"chartViews.change",method:"PATCH",path:"/v1/environments/"+r("chartViews.change","ref",e.path.ref)+"/chart-views/"+r("chartViews.change","id",e.path.id),auth:[["PalbaseBearer"]],answers:{200:"json"},idempotent:!0,headers:e.headers,body:{kind:"json",contentType:"application/json",value:e.body},signal:e.signal})}},webhooks:{async list(e){return t.send({op:"webhooks.list",method:"GET",path:"/v1/environments/"+r("webhooks.list","ref",e.path.ref)+"/webhooks",auth:[["PalbaseBearer"]],answers:{200:"json"},signal:e.signal})},async add(e){return t.send({op:"webhooks.add",method:"POST",path:"/v1/environments/"+r("webhooks.add","ref",e.path.ref)+"/webhooks",auth:[["PalbaseBearer"]],answers:{200:"json"},idempotent:!0,headers:e.headers,body:{kind:"json",contentType:"application/json",value:e.body},signal:e.signal})},async deliveries(e){return t.send({op:"webhooks.deliveries",method:"GET",path:"/v1/environments/"+r("webhooks.deliveries","ref",e.path.ref)+"/webhooks/deliveries",auth:[["PalbaseBearer"]],answers:{200:"json"},query:e.query,signal:e.signal})},async redeliver(e){return t.send({op:"webhooks.redeliver",method:"POST",path:"/v1/environments/"+r("webhooks.redeliver","ref",e.path.ref)+"/webhooks/deliveries/"+r("webhooks.redeliver","delivery",e.path.delivery)+"/redeliver",auth:[["PalbaseBearer"]],answers:{200:"json"},idempotent:!0,headers:e.headers,signal:e.signal})},async change(e){return t.send({op:"webhooks.change",method:"PUT",path:"/v1/environments/"+r("webhooks.change","ref",e.path.ref)+"/webhooks/"+r("webhooks.change","endpoint",e.path.endpoint),auth:[["PalbaseBearer"]],answers:{200:"json"},idempotent:!0,headers:e.headers,body:{kind:"json",contentType:"application/json",value:e.body},signal:e.signal})},async remove(e){return t.send({op:"webhooks.remove",method:"DELETE",path:"/v1/environments/"+r("webhooks.remove","ref",e.path.ref)+"/webhooks/"+r("webhooks.remove","endpoint",e.path.endpoint),auth:[["PalbaseBearer"]],answers:{204:"empty"},idempotent:!0,headers:e.headers,signal:e.signal})}},environmentTokens:{async list(e){return t.send({op:"environmentTokens.list",method:"GET",path:"/v1/environments/"+r("environmentTokens.list","ref",e.path.ref)+"/tokens",auth:[["PalbaseBearer"]],answers:{200:"json"},signal:e.signal})},async mint(e){return t.send({op:"environmentTokens.mint",method:"POST",path:"/v1/environments/"+r("environmentTokens.mint","ref",e.path.ref)+"/tokens",auth:[["PalbaseBearer"],[]],answers:{200:"json"},idempotent:!0,headers:e.headers,body:{kind:"json",contentType:"application/json",value:e.body},signal:e.signal})},async revoke(e){return t.send({op:"environmentTokens.revoke",method:"DELETE",path:"/v1/environments/"+r("environmentTokens.revoke","ref",e.path.ref)+"/tokens/"+r("environmentTokens.revoke","id",e.path.id),auth:[["PalbaseBearer"]],answers:{204:"empty"},idempotent:!0,headers:e.headers,signal:e.signal})}},billing:{async bill(e){return t.send({op:"billing.bill",method:"GET",path:"/v1/orgs/"+r("billing.bill","id",e.path.id)+"/billing",auth:[["PalbaseBearer"]],answers:{200:"json"},signal:e.signal})},async confirm(e){return t.send({op:"billing.confirm",method:"POST",path:"/v1/orgs/"+r("billing.confirm","id",e.path.id)+"/billing/checkout/"+r("billing.confirm","session",e.path.session)+"/confirm",auth:[["PalbaseBearer"]],answers:{200:"json"},idempotent:!0,headers:e.headers,signal:e.signal})},async cards(e){return t.send({op:"billing.cards",method:"GET",path:"/v1/orgs/"+r("billing.cards","id",e.path.id)+"/billing/cards",auth:[["PalbaseBearer"]],answers:{200:"json"},signal:e.signal})},async defaultCard(e){return t.send({op:"billing.defaultCard",method:"PUT",path:"/v1/orgs/"+r("billing.defaultCard","id",e.path.id)+"/billing/cards/"+r("billing.defaultCard","card",e.path.card)+"/default",auth:[["PalbaseBearer"]],answers:{200:"json"},idempotent:!0,headers:e.headers,signal:e.signal})},async removeCard(e){return t.send({op:"billing.removeCard",method:"DELETE",path:"/v1/orgs/"+r("billing.removeCard","id",e.path.id)+"/billing/cards/"+r("billing.removeCard","card",e.path.card),auth:[["PalbaseBearer"]],answers:{200:"json"},idempotent:!0,headers:e.headers,signal:e.signal})},async customer(e){return t.send({op:"billing.customer",method:"GET",path:"/v1/orgs/"+r("billing.customer","id",e.path.id)+"/billing/customer",auth:[["PalbaseBearer"]],answers:{200:"json"},signal:e.signal})},async setCustomer(e){return t.send({op:"billing.setCustomer",method:"PUT",path:"/v1/orgs/"+r("billing.setCustomer","id",e.path.id)+"/billing/customer",auth:[["PalbaseBearer"]],answers:{200:"json"},idempotent:!0,headers:e.headers,body:{kind:"json",contentType:"application/json",value:e.body},signal:e.signal})},async charges(e){return t.send({op:"billing.charges",method:"GET",path:"/v1/orgs/"+r("billing.charges","id",e.path.id)+"/billing/charges",auth:[["PalbaseBearer"]],answers:{200:"json"},query:e.query,signal:e.signal})},async csv(e){return t.send({op:"billing.csv",method:"GET",path:"/v1/orgs/"+r("billing.csv","id",e.path.id)+"/billing/charges.csv",auth:[["PalbaseBearer"]],answers:{},ownResponse:!0,query:e.query,signal:e.signal})},async invoices(e){return t.send({op:"billing.invoices",method:"GET",path:"/v1/orgs/"+r("billing.invoices","id",e.path.id)+"/billing/invoices",auth:[["PalbaseBearer"]],answers:{200:"json"},query:e.query,signal:e.signal})},async transfer(e){return t.send({op:"billing.transfer",method:"POST",path:"/v1/orgs/"+r("billing.transfer","id",e.path.id)+"/billing/transfers",auth:[["PalbaseBearer"]],answers:{200:"json"},idempotent:!0,headers:e.headers,body:{kind:"json",contentType:"application/json",value:e.body},signal:e.signal})},async environment(e){return t.send({op:"billing.environment",method:"GET",path:"/v1/orgs/"+r("billing.environment","id",e.path.id)+"/billing/environments/"+r("billing.environment","ref",e.path.ref),auth:[["PalbaseBearer"]],answers:{200:"json"},signal:e.signal})},async steer(e){return t.send({op:"billing.steer",method:"PATCH",path:"/v1/orgs/"+r("billing.steer","id",e.path.id)+"/billing/environments/"+r("billing.steer","ref",e.path.ref),auth:[["PalbaseBearer"]],answers:{200:"json"},idempotent:!0,headers:e.headers,body:{kind:"json",contentType:"application/json",value:e.body},signal:e.signal})},async topUp(e){return t.send({op:"billing.topUp",method:"POST",path:"/v1/orgs/"+r("billing.topUp","id",e.path.id)+"/billing/environments/"+r("billing.topUp","ref",e.path.ref)+"/topups",auth:[["PalbaseBearer"]],answers:{200:"json"},idempotent:!0,headers:e.headers,body:{kind:"json",contentType:"application/json",value:e.body},signal:e.signal})},async bankTransfer(e){return t.send({op:"billing.bankTransfer",method:"POST",path:"/v1/orgs/"+r("billing.bankTransfer","id",e.path.id)+"/billing/environments/"+r("billing.bankTransfer","ref",e.path.ref)+"/bank-transfers",auth:[["PalbaseBearer"]],answers:{200:"json"},idempotent:!0,headers:e.headers,body:{kind:"json",contentType:"application/json",value:e.body},signal:e.signal})},async ledger(e){return t.send({op:"billing.ledger",method:"GET",path:"/v1/orgs/"+r("billing.ledger","id",e.path.id)+"/billing/environments/"+r("billing.ledger","ref",e.path.ref)+"/ledger",auth:[["PalbaseBearer"]],answers:{200:"json"},query:e.query,signal:e.signal})}},accessRequests:{async request(e){return t.send({op:"accessRequests.request",method:"POST",path:"/v1/access-requests",auth:[["PalbaseBearer"],[]],answers:{200:"json"},idempotent:!0,headers:e.headers,body:{kind:"json",contentType:"application/json",value:e.body},signal:e.signal})}},docs:{async search(e){return t.send({op:"docs.search",method:"GET",path:"/v1/docs/search",auth:[["PalbaseBearer"],[]],answers:{200:"json"},query:e.query,signal:e.signal})}}}}function L(t){let{mint:e,revoke:i}=t;return async s=>{let g=await e(s),p=s.body?.role,l=s.body?.on_behalf_of;if(p===void 0&&l===void 0)return g;let d=g.data,o=[];if(p!==void 0&&d.role!==p&&o.push(`role ${p} (it came back ${d.role==null?"at its minter's":d.role})`),l!==void 0&&d.on_behalf_of!==l.trim()&&o.push("on_behalf_of"),o.length===0)return g;let n;try{await i({path:{ref:s.path.ref,id:String(d.id)}})}catch(m){n=m}let u=`Studio minted the token without the ${o.join(" and ")} asked for \u2014 it is older than this SDK`;throw new b({op:"environmentTokens.mint",status:0,code:"token_role_not_kept",message:n===void 0?`environmentTokens.mint: ${u}; the token (${d.id}) was revoked at once and is not returned \u2014 mint it again once Studio is updated`:`environmentTokens.mint: ${u}, and revoking it failed (${n instanceof Error?n.message:String(n)}) \u2014 revoke token ${d.id} of environment ${s.path.ref} yourself, now`,cause:n})}}var y={pbo_:"an organization's",pbe_:"an environment's"},z=/^[A-Za-z0-9_-]*$/,K=64,h=44;function O(t){if(typeof t!="string"||t==="")return"token is missing: pass an access token, an organization's (pbo_\u2026) or an environment's (pbe_\u2026)";let e=t.slice(0,4);if(!Object.hasOwn(y,e))return`token has the wrong prefix: an access token starts with pbo_ (an organization's) or pbe_ (an environment's)${/^pb_[a-z0-9]+_[cs]/.test(t)?" \u2014 a project key belongs in palbase/server or palbase/web":""}`;let i=t.slice(4);if(i.length!==K)return`token has the wrong length: ${y[e]} access token is ${e} and ${K} characters, this one has ${i.length} after it`;if(!z.test(i))return`token is not ${y[e]} access token: after ${e} come base64url characters alone (A\u2013Z, a\u2013z, 0\u20139, - and _)`;let s=N(i),g=(s[h]<<24|s[h+1]<<16|s[h+2]<<8|s[h+3])>>>0;if($(e,s.subarray(0,h))!==g)return"token's checksum does not match: it was mistyped or cut, or made before access tokens carried one \u2014 make a new token"}function H(t){return O(t)===void 0}function W(t){let e=O(t);if(e!==void 0)throw new TypeError(e)}var J="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";function N(t){let e=new Uint8Array(t.length*6/8),i=0,s=0,g=0;for(let p of t)i=i<<6|J.indexOf(p),s+=6,s>=8&&(s-=8,e[g++]=i>>s&255);return e}var V=(()=>{let t=new Uint32Array(256);for(let e=0;e<256;e++){let i=e;for(let s=0;s<8;s++)i=i&1?3988292384^i>>>1:i>>>1;t[e]=i>>>0}return t})();function $(t,e){let i=4294967295;for(let s=0;s<t.length;s++)i=V[(i^t.charCodeAt(s))&255]^i>>>8;for(let s of e)i=V[(i^s)&255]^i>>>8;return(i^4294967295)>>>0}var q="palbase.studio",X="palbase";function Y(){let t=globalThis;return typeof t.window<"u"||typeof t.document<"u"||typeof t.importScripts=="function"||I()}var _=class{domain;#e;#t=new Map;constructor(e){if(Y())throw new TypeError("palbase/cloud runs on a server: its access token opens the organization's projects, so it never goes into a browser, a web worker or a mobile app \u2014 keep it on your server, and have your app call that");W(e?.token);let i=e.domain??q;if(typeof i!="string"||!/^[a-z0-9-]+(\.[a-z0-9-]+)+$/.test(i))throw new TypeError(`domain ${JSON.stringify(i)} is not a domain`);this.domain=i;let s=e.token;this.#e=p=>G(f({baseUrl:p,credentials:{token:s},fetch:e.fetch,solveProofOfWork:!1}),e.retry??D);let g=M(this.#e(`https://palbase.app.${i}`));g.environmentTokens.mint=L(g.environmentTokens),Object.assign(this,g)}project(e){if(typeof e!="string"||!/^[a-z0-9]{1,63}$/.test(e))throw new TypeError(`${JSON.stringify(e)} is not an environment's ref`);let i=this.#t.get(e);return i||(i=B(this.#e(e===X?`https://connect.${this.domain}`:`https://${e}.${this.domain}`)),this.#t.set(e,i)),i}};export{q as DEFAULT_DOMAIN,_ as PalbaseCloud,b as PalbaseError,H as tokenIsWellFormed};
|
package/dist/refuse/ai.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! palbase 0.
|
|
1
|
+
/*! palbase 0.23.1 — Palbase SDK License (see LICENSE) */
|
|
2
2
|
throw new Error("palbase/ai is for servers: it speaks with the project secret key, which never goes into a browser or a mobile app \u2014 call your backend, and let it ask the model");
|
package/dist/refuse/backend.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! palbase 0.
|
|
1
|
+
/*! palbase 0.23.1 — Palbase SDK License (see LICENSE) */
|
|
2
2
|
throw new Error("palbase/backend is a server framework: it runs on your backend, never in a browser or a mobile app \u2014 apps use palbase/web (or the native SDKs)");
|
package/dist/refuse/cloud.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! palbase 0.
|
|
1
|
+
/*! palbase 0.23.1 — Palbase SDK License (see LICENSE) */
|
|
2
2
|
throw new Error("palbase/cloud is for servers: its access token opens the organization's projects, so it belongs on your server and never in a browser or a mobile app \u2014 have your app call your server");
|
package/dist/refuse/server.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! palbase 0.
|
|
1
|
+
/*! palbase 0.23.1 — Palbase SDK License (see LICENSE) */
|
|
2
2
|
throw new Error("palbase/server is for servers: its secret key never goes into a browser or a mobile app \u2014 apps use palbase/web (or the native SDKs) with the publishable key");
|
package/dist/server/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! palbase 0.
|
|
2
|
-
import{a as e,b as f,c as g,d as h,e as i,f as j,g as k,h as l,i as m,j as n,k as o,l as p,m as q,n as r,o as s,p as t,q as u,r as v,s as w,t as x,u as y}from"../chunks/
|
|
1
|
+
/*! palbase 0.23.1 — Palbase SDK License (see LICENSE) */
|
|
2
|
+
import{a as e,b as f,c as g,d as h,e as i,f as j,g as k,h as l,i as m,j as n,k as o,l as p,m as q,n as r,o as s,p as t,q as u,r as v,s as w,t as x,u as y}from"../chunks/U5FQV4H6.js";import{a as c,b as d}from"../chunks/675S5LPE.js";import"../chunks/OUNCAINB.js";import"../chunks/QY4VHBSI.js";import{o as b}from"../chunks/G3XVTFYH.js";import"../chunks/KQSO62BH.js";import{b as a}from"../chunks/BB57HGRH.js";import"../chunks/D6PLSRTA.js";import"../chunks/OLYFCCY7.js";export{o as AuthUnavailable,b as EVENT_TYPES,c as FieldError,d as Fields,a as PalbaseError,t as ReservationSettled,n as TokenError,q as TokenVerifier,f as Transit,e as TransitRefusal,g as TransitRequest,i as WebhookSignatureError,h as createServer,s as isEntitled,y as loadSecrets,v as pages,x as platformOwn,w as processOwn,r as requestAddress,p as sessionStanding,l as signatureHeader,k as verifySignature,j as verifyWebhook,m as verifyWebhookRequest,u as withReservation};
|
package/dist/server/testing.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! palbase 0.
|
|
2
|
-
import{a,b,c,d,e}from"../chunks/
|
|
1
|
+
/*! palbase 0.23.1 — Palbase SDK License (see LICENSE) */
|
|
2
|
+
import{a,b,c,d,e}from"../chunks/BAGSKVPB.js";import"../chunks/675S5LPE.js";import"../chunks/D6PLSRTA.js";import"../chunks/OLYFCCY7.js";export{b as TestApiError,e as api,c as createTestApi,a as testFields,d as testRun};
|
package/dist/web/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! palbase 0.
|
|
2
|
-
import{a as I,b as j,c as q,d as G,e as D,f as H,g as N,h as U,i as F,j as B,k as J,l as K,m as W,n as X,o as Y,p as Z,q as ee,r as te,s as ne,t as re,u as oe,v as se,w as ae,x as ie}from"../chunks/
|
|
1
|
+
/*! palbase 0.23.1 — Palbase SDK License (see LICENSE) */
|
|
2
|
+
import{a as I,b as j,c as q,d as G,e as D,f as H,g as N,h as U,i as F,j as B,k as J,l as K,m as W,n as X,o as Y,p as Z,q as ee,r as te,s as ne,t as re,u as oe,v as se,w as ae,x as ie}from"../chunks/TZC63UZ7.js";import{a as _,b as Q,f as z}from"../chunks/GO3DJFL2.js";import"../chunks/A3LKL4L6.js";import"../chunks/35PCXXWS.js";import"../chunks/JZJXMPER.js";import"../chunks/5QTY55XZ.js";import{b as S,c as T,d as O,f as x,g as R,j as A,k as V,l as M,m as E,o as v}from"../chunks/OUNCAINB.js";import"../chunks/G3XVTFYH.js";import"../chunks/KQSO62BH.js";import{b as L}from"../chunks/BB57HGRH.js";import"../chunks/D6PLSRTA.js";import"../chunks/OLYFCCY7.js";var ce="oai-events";async function pe(e){if(typeof e?.start!="function")throw new TypeError("connectVoice: start(sdp) is the round trip to the app's backend, which starts the voice (chats.voice.start) and answers { id, sdp }");let r=e.rtc??le(),t=e.signal;t?.throwIfAborted();let l=e.audio??ue(),f=e.microphone===void 0,c=e.microphone??await r.getUserMedia({audio:!0});if(t?.aborted){if(f)for(let n of c.getTracks())n.stop();throw t.reason}let o=new r.RTCPeerConnection,s=!1,u=()=>{if(!s){if(s=!0,m.close(),o.close(),f)for(let n of c.getTracks())n.stop();l.srcObject!==null&&(l.srcObject=null)}};o.addEventListener("track",n=>{l.srcObject=n.streams[0]??new MediaStream([n.track]),l.play?.()?.catch?.(()=>{})}),o.addEventListener("connectionstatechange",()=>e.onState?.(o.connectionState));for(let n of c.getAudioTracks())o.addTrack(n,c);let m=o.createDataChannel(ce);m.addEventListener("message",n=>{let d=ye(n.data);d!==void 0&&e.onError?.(d)});let p=()=>u();t?.addEventListener("abort",p,{once:!0});try{await o.setLocalDescription(await o.createOffer()),t?.throwIfAborted(),await de(o,e.iceTimeoutMs??1e4,t);let n=o.localDescription?.sdp;if(!n)throw new Error("connectVoice: the peer connection made no offer");let d=await e.start(n);if(t?.throwIfAborted(),typeof d?.id!="string"||d.id===""||typeof d.sdp!="string"||d.sdp==="")throw new TypeError("connectVoice: start answered no voice \u2014 it is { id, sdp }, chats.voice.start's answer as the backend got it");return await o.setRemoteDescription({type:"answer",sdp:d.sdp}),t?.removeEventListener("abort",p),{id:d.id,peer:o,audio:l,microphone:c,get muted(){return c.getAudioTracks().every(h=>!h.enabled)},mute(h){for(let w of c.getAudioTracks())w.enabled=!h},close:u}}catch(n){throw t?.removeEventListener("abort",p),u(),t?.aborted?t.reason:n}}function de(e,r,t){return e.iceGatheringState==="complete"?Promise.resolve():t?.aborted?Promise.reject(t.reason):new Promise((l,f)=>{let c=()=>{clearTimeout(u),e.removeEventListener("icegatheringstatechange",o),t?.removeEventListener("abort",s)},o=()=>{e.iceGatheringState==="complete"&&(c(),l())},s=()=>{c(),f(t?.reason)},u=setTimeout(()=>{c(),f(new Error(`connectVoice: the network candidates were not gathered in ${r} ms`))},r);e.addEventListener("icegatheringstatechange",o),t?.addEventListener("abort",s,{once:!0})})}function ye(e){if(typeof e=="string")try{let r=JSON.parse(e);return r.type!=="error"?void 0:typeof r.error?.message=="string"?r.error.message:typeof r.error?.code=="string"?r.error.code:"the voice failed"}catch{return}}function le(){let e=globalThis;if(typeof e.RTCPeerConnection!="function"||typeof e.navigator?.mediaDevices?.getUserMedia!="function")throw new TypeError("connectVoice: this runtime has no WebRTC (RTCPeerConnection, navigator.mediaDevices): a chat's voice is a browser's");let r=e.navigator.mediaDevices;return{RTCPeerConnection:e.RTCPeerConnection,getUserMedia:t=>r.getUserMedia(t)}}function ue(){let e=globalThis.document;if(!e)throw new TypeError("connectVoice: give audio \u2014 the element the voice plays in \u2014 where there is no document");let r=e.createElement("audio");return r.autoplay=!0,r}var i=e=>typeof e=="object"&&e!==null&&!Array.isArray(e)?e:void 0;function fe(e,r,t){let l=i(i(i(e)?.components)?.schemas)??{},f=(p,n)=>{let d=new Set,h=(b,g,y)=>{let a=i(b);if(!a)return;if(typeof a.$ref=="string"){if(y.has(a.$ref)||!a.$ref.startsWith("#/components/schemas/"))return;h(l[a.$ref.slice(21)],g,new Set(y).add(a.$ref));return}if(a[S]===!0){d.add(g);return}for(let C of["anyOf","oneOf","allOf"]){let k=a[C];if(Array.isArray(k))for(let $ of k)h($,g,y)}let P=i(a.properties);if(P)for(let[C,k]of Object.entries(P))h(k,`${g}/${E(C)}`,y);i(a.items)&&h(a.items,`${g}/*`,y);for(let C of["additionalProperties","patternProperties","prefixItems"])if(a[C]!==void 0&&w(a[C],new Set(y)))throw new Error(`${t}: an encrypted field is a named property \u2014 not every key of a record, nor a tuple's place`)},w=(b,g)=>{if(Array.isArray(b))return b.some(a=>w(a,g));let y=i(b);return y?y[S]===!0?!0:typeof y.$ref=="string"&&!g.has(y.$ref)&&y.$ref.startsWith("#/components/schemas/")?(g.add(y.$ref),w(l[y.$ref.slice(21)],g)):Object.values(y).some(a=>typeof a=="object"&&a!==null&&w(a,g)):!1};return h(p,n,new Set),[...d]},c=p=>i(i(i(p)?.["application/json"])?.schema),o=[];o.push(...f(c(i(r.requestBody)?.content),"/body"));for(let p of Array.isArray(r.parameters)?r.parameters:[]){let n=i(p);if(!n)continue;let d=f(n.schema,`/query/${E(String(n.name))}`);if(d.length!==0){if(n.in!=="query")throw new Error(`${t}: ${String(n.in)} parameter ${String(n.name)} is marked encrypted \u2014 a body's or a query's field is`);if(d.some(h=>h.split("/").length!==3))throw new Error(`${t}: an encrypted query field is one of the query's own names`);o.push(...d)}}let s=i(r.responses)??{},u=Object.keys(s).filter(p=>/^2\d\d$/.test(p)).sort((p,n)=>p==="200"?-1:n==="200"?1:p.localeCompare(n)),m=u.length>0?f(c(i(s[u[0]])?.content),"/response"):[];if(o.length+m.length!==0){if(r["x-palbase-sse"]!==void 0&&m.length>0)throw new Error(`${t}: a streamed answer carries no encrypted field`);if(r["x-palbase-upload"]!==void 0)throw new Error(`${t}: an upload goes through storage, which seals nothing \u2014 it carries no encrypted field`);return{request:o,response:m}}}async function me(e){let r=`${e.method.toUpperCase()} ${e.path}`,t=i(i(i(i(e.contract)?.paths)?.[e.path])?.[e.method.toLowerCase()]),l=t?fe(e.contract,t,r):void 0;if(!l)return{body:e.body,query:e.query,open:async s=>s};let{key:f,header:c}=await R(e.key.kid,O(e.key.publicKey),x(e.projectId,e.method,e.path,e.params??[])),o=(s,u)=>s==null?s:v(s,u,l.request,(m,p)=>A(f,m,p));return{header:c,body:await o(e.body,"/body"),query:await o(e.query,"/query"),open:s=>s===void 0?Promise.resolve(s):v(s,"/response",l.response,async(u,m)=>{if(!V(m))throw new T("unopenable",`${r}: ${u} came plain where the contract says it is encrypted`);return M(f,u,m)})}}export{N as Analytics,_ as BackendError,G as Channel,U as Consent,ne as ConversationList,oe as ConversationView,re as DeletedGroupList,Z as Flags,z as GatewayError,J as InApp,F as Inbox,H as Installation,te as Messaging,W as Notify,L as PalbaseError,X as Purchases,D as RealtimeSocket,B as SESSION_START,ae as ScheduledList,I as SessionChangedError,se as ThreadView,K as WebPush,pe as connectVoice,ie as createClient,me as encryptedCall,ee as indexedDBKeyValue,Q as isBackendError,q as localStore,j as memoryStore,Y as redemptionToken};
|
package/dist/web/message.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! palbase 0.
|
|
2
|
-
import{a as i}from"../chunks/
|
|
1
|
+
/*! palbase 0.23.1 — Palbase SDK License (see LICENSE) */
|
|
2
|
+
import{a as i}from"../chunks/JZJXMPER.js";import{a as e,b as s,c as t,d as p,e as o,f as a,h as r,j as n,k as y,p as M,q as l,t as g}from"../chunks/5QTY55XZ.js";import"../chunks/OLYFCCY7.js";export{n as MESSAGE_COMPONENTS,a as MESSAGE_ICONS,r as MESSAGE_SCHEMA,s as assetId,y as countdownValues,e as fontFamily,o as htmlDocument,t as prepareAssets,i as presentMessage,g as renderMessage,M as resolveMessage,l as resolveMessageWithPaths,p as unzip};
|
package/dist/web/palbe.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! palbase 0.
|
|
2
|
-
import{c as e,d as r,i as t}from"../chunks/
|
|
1
|
+
/*! palbase 0.23.1 — Palbase SDK License (see LICENSE) */
|
|
2
|
+
import{c as e,d as r,i as t}from"../chunks/GO3DJFL2.js";import"../chunks/A3LKL4L6.js";import"../chunks/OUNCAINB.js";import"../chunks/KQSO62BH.js";import"../chunks/BB57HGRH.js";import"../chunks/D6PLSRTA.js";import"../chunks/OLYFCCY7.js";export{e as RESERVED_CLIENT_NAMES,t as __registerBackend,r as isClientName};
|
package/dist/web/paywall.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! palbase 0.
|
|
2
|
-
import{a as f,b as d,c as m,d as u,e as A,f as c,g as R}from"../chunks/
|
|
1
|
+
/*! palbase 0.23.1 — Palbase SDK License (see LICENSE) */
|
|
2
|
+
import{a as f,b as d,c as m,d as u,e as A,f as c,g as R}from"../chunks/35PCXXWS.js";import{a as e,b as a,c as t,d as l,e as r,f as o,g as p,i as y,k as s,l as P,n,o as i,s as w}from"../chunks/5QTY55XZ.js";import"../chunks/BB57HGRH.js";import"../chunks/D6PLSRTA.js";import"../chunks/OLYFCCY7.js";export{y as PAYWALL_COMPONENTS,o as PAYWALL_ICONS,p as PAYWALL_SCHEMA,c as Paywall,a as assetId,f as attributesHeader,s as countdownValues,R as defaultPaywall,e as fontFamily,u as formatPeriod,m as formatPrice,r as htmlDocument,A as packageValues,P as packagesOf,d as parseDuration,t as prepareAssets,w as renderPaywall,n as resolvePaywall,i as resolvePaywallWithPaths,l as unzip};
|
package/dist/web/push-sw.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! palbase 0.
|
|
1
|
+
/*! palbase 0.23.1 — Palbase SDK License (see LICENSE) */
|
|
2
2
|
"use strict";(()=>{function g(n,s){if(n)try{let i=new URL(n,s);if(i.protocol==="https:"||i.protocol==="http:"&&(i.hostname==="localhost"||i.hostname==="127.0.0.1"))return i.href}catch{}}function p(n){let s=new URL(n.location.href).searchParams,i=s.get("url")??"",u=s.get("key")??"",a=(t,e)=>!t||!i?Promise.resolve():n.fetch(`${i.replace(/\/$/,"")}/notify/receipts`,{method:"POST",headers:{"content-type":"application/json",apikey:u},body:JSON.stringify({receipts:[{receipt:t,status:e}]}),keepalive:!0}).catch(()=>{}),l=async(t,e)=>{for(let o of await n.clients.matchAll({type:"window",includeUncontrolled:!0}))o.postMessage({type:"palbase.push",event:t,url:e.url,data:e.data})};n.addEventListener("push",(t=>{let e={};try{e=t.data?.json()??{}}catch{}let o={url:e.url,receipt:e.receipt,data:e.data},d=async()=>e.data?.type==="messaging.message"&&(await n.clients.matchAll({type:"window",includeUncontrolled:!0})).some(r=>r.focused===!0);t.waitUntil(d().then(r=>r?void 0:n.registration.showNotification(e.title??"",{body:e.body,image:e.image,tag:e.tag,data:o})).then(()=>Promise.all([a(e.receipt,"delivered"),l("received",o)])))})),n.addEventListener("notificationclick",(t=>{t.notification.close();let e=t.notification.data??{},o=g(e.url,n.location.origin),d=async()=>{if(!o)return;let c=(await n.clients.matchAll({type:"window",includeUncontrolled:!0})).find(f=>f.url===o);c?await c.focus():await n.clients.openWindow(o)};t.waitUntil(Promise.all([a(e.receipt,"opened"),d(),l("opened",e)]))})),n.addEventListener("notificationclose",(t=>{t.waitUntil(a(t.notification.data?.receipt,"dismissed"))}))}typeof self<"u"&&typeof self.registration=="object"&&!("document"in self)&&p(self);})();
|
package/dist/web/ssr.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! palbase 0.
|
|
2
|
-
import{x as f}from"../chunks/
|
|
1
|
+
/*! palbase 0.23.1 — Palbase SDK License (see LICENSE) */
|
|
2
|
+
import{x as f}from"../chunks/TZC63UZ7.js";import"../chunks/GO3DJFL2.js";import"../chunks/A3LKL4L6.js";import"../chunks/35PCXXWS.js";import"../chunks/JZJXMPER.js";import"../chunks/5QTY55XZ.js";import"../chunks/OUNCAINB.js";import"../chunks/G3XVTFYH.js";import"../chunks/KQSO62BH.js";import"../chunks/BB57HGRH.js";import"../chunks/D6PLSRTA.js";import"../chunks/OLYFCCY7.js";var C=Object.freeze({"Cache-Control":"private, no-cache, no-store, must-revalidate, max-age=0",Expires:"0",Pragma:"no-cache"}),x={path:"/",sameSite:"lax",secure:!0,httpOnly:!1,maxAge:400*24*60*60},u=3180,k=5*6e4;function d(t){let e=/^pb_([a-z0-9]+)_c/.exec(t)?.[1];if(e===void 0)throw new TypeError("publishableKey is the project publishable key (pb_<ref>_c\u2026)");return`pb-${e}-session`}var y=t=>{let e=new TextEncoder().encode(JSON.stringify(t)),o="";for(let s of e)o+=String.fromCharCode(s);return btoa(o).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")},b=t=>{try{let e=atob(t.replace(/-/g,"+").replace(/_/g,"/")),o=JSON.parse(new TextDecoder().decode(Uint8Array.from(e,s=>s.charCodeAt(0))));return typeof o.accessToken!="string"||typeof o.refreshToken!="string"||typeof o.expiresAt!="number"||typeof o.userId!="string"?null:o}catch{return null}};function m(t,e,o={},s=!1){let c={...x,...o},g=async()=>new Map((await e.getAll()).map(n=>[n.name,n.value])),S=n=>n===t||n.startsWith(`${t}.`)&&/^\d+$/.test(n.slice(t.length+1)),h=async n=>{if(!e.setAll)return;let i=n===null?[]:n.length<=u?[[t,n]]:Array.from({length:Math.ceil(n.length/u)},(r,l)=>[`${t}.${l}`,n.slice(l*u,(l+1)*u)]),p=new Set(i.map(([r])=>r)),a=i.map(([r,l])=>({name:r,value:l,options:c}));for(let r of(await g()).keys())S(r)&&!p.has(r)&&a.push({name:r,value:"",options:{...c,maxAge:0}});a.length>0&&await e.setAll(a,{...C})};return{async load(){let n=await g(),i=n.get(t);if(i===void 0){let p="";for(let a=0;n.has(`${t}.${a}`);a++)p+=n.get(`${t}.${a}`);i=p}return i?b(i):null},save:n=>h(y(n)),clear:()=>h(null),shared:s}}function A(t){let{cookies:e,cookieOptions:o,...s}=t,c=t.refresh??(e.setAll?"before":"never");return f({...s,refresh:c,storage:m(d(t.publishableKey),e,o)})}function O(){let t=()=>{let e=globalThis.document;if(!e)throw new Error("documentCookies: there is no document here \u2014 a server gives its request's cookies to createServerClient");return e};return{getAll:()=>t().cookie.split(";").map(e=>e.trim()).filter(e=>e.includes("=")).map(e=>{let o=e.indexOf("=");return{name:e.slice(0,o),value:e.slice(o+1)}}),setAll(e){for(let o of e){let s=o.options,c=[`Path=${s.path??"/"}`,s.domain?`Domain=${s.domain}`:"",s.maxAge!==void 0?`Max-Age=${s.maxAge}`:"",s.expires?`Expires=${s.expires.toUTCString()}`:"",s.sameSite?`SameSite=${s.sameSite.charAt(0).toUpperCase()}${s.sameSite.slice(1)}`:"",s.secure?"Secure":""].filter(Boolean);t().cookie=[`${o.name}=${o.value}`,...c].join("; ")}}}}function $(t){let{cookieOptions:e,...o}=t,s=globalThis.location?.protocol==="https:";return f({...o,storage:m(d(t.publishableKey),O(),{secure:s,...e},!0)})}async function v(t){let e=await t.auth.currentSession();if(!e||(e.expiresAt-Date.now()<=k&&await t.auth.refreshSession().catch(()=>{}),!await t.auth.currentSession()))return null;try{return(await t.auth.api.verifyTokenUser()).data}catch(o){if(o.status===401)return null;throw o}}export{C as NO_STORE_HEADERS,x as SESSION_COOKIE_OPTIONS,m as cookieSessionStore,$ as createBrowserClient,A as createServerClient,O as documentCookies,v as keepSession,d as sessionCookieName};
|
package/dist/web/vite.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! palbase 0.
|
|
2
|
-
import"../chunks/
|
|
1
|
+
/*! palbase 0.23.1 — Palbase SDK License (see LICENSE) */
|
|
2
|
+
import"../chunks/OLYFCCY7.js";import{execFile as $}from"node:child_process";import{existsSync as y,mkdtempSync as k,readFileSync as S,rmSync as x,writeFileSync as P}from"node:fs";import{createRequire as O}from"node:module";import{tmpdir as W}from"node:os";import{dirname as g,join as o,relative as u,resolve as v,sep as d}from"node:path";var E=/\.(?:ts|js|mts|mjs)$/;function F(n){if(!/^[a-z][a-z0-9-]*$/.test(n.app))throw new TypeError(`palbase({ app }): ${JSON.stringify(n.app)} is an app's slug (palbase apps:list)`);let c=process.cwd(),p="",i="",f=()=>v(c,n.dir??"palbase"),m=()=>{let e=n.environments[p];if(!e)throw new Error(`palbase: the mode "${p}" is not built against any environment \u2014 say which in vite.config: palbase({ environments: { ${JSON.stringify(p)}: '<environment slug>' } })`);return e};return{name:"palbase",enforce:"pre",config(e,s){p=s.mode,i=s.command??"";let r=e.build?.rollupOptions?.onwarn;return{build:{rollupOptions:{onwarn(t,a){let l=String(t.exporter??t.id??"");if(t.code==="MISSING_EXPORT"&&l.includes(`${d}environments${d}`))throw new Error(`palbase: ${t.message} \u2014 ${m()}'s backend has no such route (palbase apps:sync brings what it has)`);r?r(t,a):a(t)}}}}},configResolved(e){c=e.root,p=e.mode,i=e.command??i},async buildStart(){i!=="build"||n.typecheck===!1||await j(c,m(),n.tsconfig)},resolveId(e,s){if(!s)return null;let r=f();if(e==="palbase"||e.startsWith("palbase/")){let w=u(r,s);return w.startsWith("..")||w===""?null:this.resolve(e,o(c,"index.html"),{skipSelf:!0})}if(!(e.startsWith(".")||e.startsWith("/")))return null;let t=v(g(s),e);if(E.test(t)||(t+=".ts"),g(t)!==r&&g(t)!==o(r,"palbe"))return null;let a=u(r,t),l=`${n.app}.ts`;if(a!==l&&!a.startsWith(`palbe${d}`))return null;let h=m(),b=o(r,"environments",h,a===l?l:o("palbe",a.slice(`palbe${d}`.length)));if(!y(b))throw new Error(`palbase: ${u(c,b)} is not there \u2014 palbase apps:sync writes it (is ${n.app} set in ${h}, and has ${h} that machine?)`);return b}}}async function j(n,c,p){let i=p?v(n,p):["tsconfig.app.json","tsconfig.json"].map(e=>o(n,e)).find(y);if(!i)return;if(!y(i))throw new Error(`palbase({ tsconfig }): ${u(n,i)} is not there`);let f;try{let e=O(o(n,"package.json")).resolve("typescript/package.json"),s=JSON.parse(S(e,"utf8")).bin?.tsc;if(!s)throw new Error("no tsc");f=o(g(e),s)}catch{throw new Error("palbase: the build type-checks the app against its environment with the app's TypeScript, and the app has none (npm i -D typescript) \u2014 or say palbase({ typecheck: false })")}let m=k(o(W(),"palbase-typecheck-"));try{let e=o(m,"tsconfig.json");P(e,JSON.stringify({extends:i,compilerOptions:{noEmit:!0,composite:!1,incremental:!1,moduleSuffixes:[`.${c}`,""]}}));let s=await new Promise(r=>$(process.execPath,[f,"-p",e,"--pretty","false"],{cwd:n,maxBuffer:16<<20},(t,a,l)=>r({code:t?typeof t.code=="number"?t.code:1:0,text:`${a}${l}`.trim()})));if(s.code!==0)throw new Error(`palbase: the app does not type-check against ${c}, the environment this build is made for \u2014 a route its backend does not have, or a call that does not fit it:
|
|
3
3
|
${s.text}`)}finally{x(m,{recursive:!0,force:!0})}}export{F as palbase};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "palbase",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.23.1",
|
|
4
4
|
"description": "Palbase for JavaScript: the web client (palbase/web), the server SDK (palbase/server), an organization's management SDK (palbase/cloud), the backend framework (palbase/backend), AI (palbase/ai) and the CLI (npx palbase).",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"homepage": "https://palbase.studio",
|
|
@@ -149,7 +149,7 @@
|
|
|
149
149
|
"dependencies": {
|
|
150
150
|
"@types/node": "26.6.4",
|
|
151
151
|
"bun-types": "1.4.2",
|
|
152
|
-
"palgres": "0.
|
|
152
|
+
"palgres": "0.23.1",
|
|
153
153
|
"reflect-metadata": "^0.2.2",
|
|
154
154
|
"typescript": "~6.0.3",
|
|
155
155
|
"zod": "^4.6.5"
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { PalbaseServer } from '../../server/src/index.js';
|
|
2
2
|
export type AttestMode = 'off' | 'monitor' | 'enforce';
|
|
3
|
+
export declare const ATTEST_CHALLENGE_PATH = "/.well-known/palbase/attest-challenge";
|
|
3
4
|
export declare const ATTEST_HEADERS: {
|
|
4
5
|
readonly deviceId: 'x-palbase-device-id';
|
|
5
6
|
readonly anchor: 'x-palbase-installation-anchor';
|
|
@@ -47,8 +48,23 @@ export declare class AttestGate {
|
|
|
47
48
|
/** The mode in force: read again when 30 seconds old; the last one read while auth cannot answer. */
|
|
48
49
|
modeNow(): Promise<AttestMode | undefined>;
|
|
49
50
|
private readMode;
|
|
50
|
-
/**
|
|
51
|
-
|
|
51
|
+
/**
|
|
52
|
+
* One request to a route marked attest: true. `raw` is the body's bytes as they came; `target` the request-target as
|
|
53
|
+
* it came, which the client signed — the URL, parsed, would have re-encoded what WHATWG encodes (a ' in a query,
|
|
54
|
+
* a ^, a space).
|
|
55
|
+
*/
|
|
56
|
+
check(request: Request, url: URL, raw: Uint8Array | undefined, target?: string): Promise<AttestOutcome>;
|
|
57
|
+
/**
|
|
58
|
+
* A challenge for the installation's anchor, ahead of its first proof (GET /.well-known/palbase/attest-challenge). Auth mints
|
|
59
|
+
* it as it does on every verdict: asked about a request with no evidence — nothing verified, nothing counted, no
|
|
60
|
+
* device's counter moved. None while the environment's mode is off; unavailable while it was never read, or auth
|
|
61
|
+
* cannot answer.
|
|
62
|
+
*/
|
|
63
|
+
challengeFor(anchor: string): Promise<{
|
|
64
|
+
challenge?: string;
|
|
65
|
+
} | {
|
|
66
|
+
unavailable: true;
|
|
67
|
+
}>;
|
|
52
68
|
private declared;
|
|
53
69
|
private outcome;
|
|
54
70
|
private schedule;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type PalbaseServer } from '../../server/src/index.js';
|
|
2
2
|
import { type AuthSpec, type RateLimit } from './decorators.js';
|
|
3
|
-
import { type AppTokens, type CorsOptions } from './engine.js';
|
|
3
|
+
import { type AppTokens, type CorsOptions, type RequestInfo } from './engine.js';
|
|
4
4
|
import { type DatabaseConfig } from './database.js';
|
|
5
5
|
import { type PalbaseConnection } from './env.js';
|
|
6
6
|
export interface AppConfig {
|
|
@@ -52,9 +52,7 @@ export interface PalbaseApplication {
|
|
|
52
52
|
/** The port it serves on. */
|
|
53
53
|
readonly port: number;
|
|
54
54
|
/** One request, without the network — for tests. */
|
|
55
|
-
handle(request: Request, info?:
|
|
56
|
-
remoteAddress?: string;
|
|
57
|
-
}): Promise<Response>;
|
|
55
|
+
handle(request: Request, info?: RequestInfo): Promise<Response>;
|
|
58
56
|
/** Stops taking connections, finishes the requests in flight (20 s at most), runs onShutdown(), sends the request traces still held (2 s at most). */
|
|
59
57
|
close(): Promise<void>;
|
|
60
58
|
}
|
|
@@ -126,14 +126,24 @@ export type AnswerOut = (text: string, done: () => void) => void;
|
|
|
126
126
|
* position 131072"). One stream, in order: a log line is never cut by it.
|
|
127
127
|
*/
|
|
128
128
|
export declare function said(mode: MigrateMode, result: unknown, out?: AnswerOut): Promise<void>;
|
|
129
|
+
/** A delivery's service transaction, as Database.$asService() gives it: a savepoint of it, its handle running SQL. */
|
|
130
|
+
export interface DeliveryService {
|
|
131
|
+
$attempt<T>(fn: (tx: {
|
|
132
|
+
query(sql: string, params?: unknown[]): Promise<unknown[]>;
|
|
133
|
+
}) => Promise<T>): Promise<T>;
|
|
134
|
+
}
|
|
129
135
|
export interface OpenDatabase {
|
|
130
136
|
model: Schema;
|
|
131
137
|
binding: Binding;
|
|
132
138
|
/** The engine: one transaction per request, as its caller (or the service role). */
|
|
133
139
|
app: AppDatabase<Tables, Schemas>;
|
|
134
140
|
requests: 'caller' | 'service';
|
|
135
|
-
/**
|
|
136
|
-
|
|
141
|
+
/**
|
|
142
|
+
* The platform's user.deleted: what the app kept of the user goes — in the delivery's service transaction (its
|
|
143
|
+
* Database.$asService()), so with every other handler's work of the delivery or with none of it, and within the
|
|
144
|
+
* request's share of connections.
|
|
145
|
+
*/
|
|
146
|
+
forget(userId: string, service: DeliveryService): Promise<{
|
|
137
147
|
deleted: number;
|
|
138
148
|
detached: number;
|
|
139
149
|
}>;
|
|
@@ -142,10 +142,17 @@ export interface RequestDatabases {
|
|
|
142
142
|
rollback(reason: unknown): Promise<void>;
|
|
143
143
|
};
|
|
144
144
|
}
|
|
145
|
+
/**
|
|
146
|
+
* What the host knows of a request beyond the Request: the peer's address, and the request-target as it came on the
|
|
147
|
+
* wire (its path and query, byte for byte) — what a device's proof signed, which the Request's URL, parsed, may have
|
|
148
|
+
* encoded otherwise (a ' or a ^ in a query).
|
|
149
|
+
*/
|
|
150
|
+
export interface RequestInfo {
|
|
151
|
+
remoteAddress?: string;
|
|
152
|
+
target?: string;
|
|
153
|
+
}
|
|
145
154
|
export interface App {
|
|
146
|
-
handle(request: Request, info?:
|
|
147
|
-
remoteAddress?: string;
|
|
148
|
-
}): Promise<Response>;
|
|
155
|
+
handle(request: Request, info?: RequestInfo): Promise<Response>;
|
|
149
156
|
start(): Promise<void>;
|
|
150
157
|
stop(): Promise<void>;
|
|
151
158
|
readonly routes: readonly string[];
|
|
@@ -9,7 +9,7 @@ export type { AgentContext, ToolContext, TurnDefinition, TurnMessage } from '../
|
|
|
9
9
|
export { getWebhookManifest, type WebhookEventHandler, type WebhookMeta } from './webhooks.js';
|
|
10
10
|
export { DiError, type DiErrorKind } from './container.js';
|
|
11
11
|
export { BadRequest, Conflict, DeadlockDetected, Forbidden, HttpError, NotFound, PalError, SerializationFailure, TooManyRequests, Unauthorized, UniqueViolation, defineError, type DefinedError, type DefinedErrorWithData, type Envelope, type FieldIssue, } from './errors.js';
|
|
12
|
-
export { createApp, MAX_BODY_BYTES, type App, type AppOptions, type AppTokens, type ClientInfo, type CorsOptions, type UserT } from './engine.js';
|
|
12
|
+
export { createApp, MAX_BODY_BYTES, type App, type AppOptions, type AppTokens, type ClientInfo, type CorsOptions, type RequestInfo, type UserT } from './engine.js';
|
|
13
13
|
export { ContractRunEnded, MigrationRunEnded, PalbaseFactory, type AppConfig, type PalbaseApplication } from './bootstrap.js';
|
|
14
14
|
export { SchemaNotPushed } from './database.js';
|
|
15
15
|
export type { DatabaseConfig } from './database.js';
|
|
@@ -18,6 +18,9 @@ type Globals = {
|
|
|
18
18
|
serviceWorker?: ServiceWorkerContainer;
|
|
19
19
|
language?: string;
|
|
20
20
|
};
|
|
21
|
+
location?: {
|
|
22
|
+
href: string;
|
|
23
|
+
};
|
|
21
24
|
Notification?: {
|
|
22
25
|
permission: NotificationPermission;
|
|
23
26
|
requestPermission(): Promise<NotificationPermission>;
|
|
@@ -33,7 +36,16 @@ export declare class WebPush {
|
|
|
33
36
|
private publishableKey;
|
|
34
37
|
private g;
|
|
35
38
|
private registered;
|
|
36
|
-
/**
|
|
39
|
+
/** Which change of who is signed in, or word of the app's, the registration is for: an older one's tries stop. */
|
|
40
|
+
private generation;
|
|
41
|
+
/** Ends a registration's wait between tries at once: a newer change, or the app's own subscribe or unsubscribe. */
|
|
42
|
+
private wake;
|
|
43
|
+
/**
|
|
44
|
+
* Palbase's subscription ended for a person who changed, its replacement not registered yet: what the next
|
|
45
|
+
* registration makes (with the ended one's key), whichever change it is for.
|
|
46
|
+
*/
|
|
47
|
+
private replacing;
|
|
48
|
+
/** The registration again for a change of who is signed in, while it runs (its retries too). */
|
|
37
49
|
changing: Promise<unknown>;
|
|
38
50
|
constructor(transport: Transport, session: SessionManager, installation: Installation, baseUrl: string, publishableKey: string, g?: Globals);
|
|
39
51
|
/** Whether this browser takes pushes at all (a service worker, the Push API, notifications). */
|
|
@@ -47,11 +59,41 @@ export declare class WebPush {
|
|
|
47
59
|
* takes pushes now, false when the person refused or the browser has none.
|
|
48
60
|
*/
|
|
49
61
|
subscribe(opts?: PushSubscribeOptions): Promise<boolean>;
|
|
50
|
-
/**
|
|
62
|
+
/**
|
|
63
|
+
* Stops this browser's pushes: its subscription ends, and the project forgets the device as it next pushes it. A
|
|
64
|
+
* registration still trying for a change of who is signed in stops first: none makes a subscription again after.
|
|
65
|
+
*/
|
|
51
66
|
unsubscribe(): Promise<void>;
|
|
67
|
+
/** The app's own subscribe or unsubscribe: newer than any change's registration, which ends its tries. */
|
|
68
|
+
private supersede;
|
|
52
69
|
/** Registers the browser's subscription again (as the app starts, or as people sign in and out): nothing when it has none. */
|
|
53
70
|
refresh(): Promise<void>;
|
|
71
|
+
/**
|
|
72
|
+
* The subscription registered again for whoever is signed in now. One the project cannot be told of (unreachable as
|
|
73
|
+
* someone signs in or out) ends at once: kept, it would stay the last person's device — their pushes shown to whoever
|
|
74
|
+
* is here now, as on a shared computer signed out of offline. A new one takes its place (no prompt: the person
|
|
75
|
+
* allowed it), which no push for the last person reaches, registered once the project can be reached and tried
|
|
76
|
+
* again meanwhile: a dropped connection ends no pushes the person allowed. Only Palbase's ends — never another
|
|
77
|
+
* worker's.
|
|
78
|
+
*/
|
|
79
|
+
private registerFor;
|
|
80
|
+
/** A wait between tries, which a newer change or the app's own word ends at once. */
|
|
81
|
+
private pause;
|
|
82
|
+
/**
|
|
83
|
+
* The registration of Palbase's worker for this project — the project its URL's key names, whatever key of the
|
|
84
|
+
* project it was registered with (one since rotated too). A page's other workers — the app's own, another push
|
|
85
|
+
* service's (FCM, OneSignal), another project's — and their subscriptions are not Palbase's to register or end.
|
|
86
|
+
*/
|
|
87
|
+
private ours;
|
|
88
|
+
private isOurs;
|
|
89
|
+
/** Palbase's subscription in this browser: the one on its worker's registration. */
|
|
54
90
|
private current;
|
|
91
|
+
/**
|
|
92
|
+
* Where Palbase's worker is registered: the scope asked for, else its folder — unless another worker holds it. A
|
|
93
|
+
* scope holds one worker, so registering there would replace the app's (its offline cache, another service's pushes):
|
|
94
|
+
* Palbase's takes a scope of its own beside it instead; a push reaches its worker whatever pages that controls.
|
|
95
|
+
*/
|
|
96
|
+
private scopeFor;
|
|
55
97
|
private register;
|
|
56
98
|
}
|
|
57
99
|
/** pb.notify: the project's notifications, as this app takes them. */
|