@visgate_ai/client 0.4.1 → 0.4.2
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/index.cjs +28 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +17 -3
- package/dist/index.d.ts +17 -3
- package/dist/index.js +28 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -298,8 +298,18 @@ declare class HfModels {
|
|
|
298
298
|
list(options?: HfModelsListOptions): Promise<HfModelInfo[]>;
|
|
299
299
|
}
|
|
300
300
|
|
|
301
|
-
/** Invitations resource: create, list, cancel, accept, decline */
|
|
301
|
+
/** Invitations resource: create, list, cancel, accept, decline, getPreview, listSent */
|
|
302
302
|
|
|
303
|
+
/** Public invitation preview (no auth). Does not include invitee email. */
|
|
304
|
+
interface InvitationPreview {
|
|
305
|
+
id: string;
|
|
306
|
+
organizationId: string;
|
|
307
|
+
organizationName: string;
|
|
308
|
+
role: string;
|
|
309
|
+
invitedByEmail: string;
|
|
310
|
+
status: string;
|
|
311
|
+
expiresAt: string;
|
|
312
|
+
}
|
|
303
313
|
interface Invitation {
|
|
304
314
|
id: string;
|
|
305
315
|
organizationId: string;
|
|
@@ -323,6 +333,10 @@ declare class Invitations {
|
|
|
323
333
|
cancel(orgId: string, inviteId: string): Promise<void>;
|
|
324
334
|
/** List pending invitations for the current user. */
|
|
325
335
|
listPending(): Promise<Invitation[]>;
|
|
336
|
+
/** Public preview of an invitation (no auth). Use for invite landing pages. */
|
|
337
|
+
getPreview(inviteId: string): Promise<InvitationPreview>;
|
|
338
|
+
/** List invitations sent by organizations the current user is a member of. */
|
|
339
|
+
listSent(): Promise<Invitation[]>;
|
|
326
340
|
/** Accept a pending invitation. */
|
|
327
341
|
accept(inviteId: string): Promise<Record<string, unknown>>;
|
|
328
342
|
/** Decline a pending invitation. */
|
|
@@ -760,6 +774,6 @@ declare class VisgateConnectionError extends VisgateError {
|
|
|
760
774
|
* Visgate JavaScript/TypeScript SDK — unified client for the Visgate vision AI gateway.
|
|
761
775
|
*/
|
|
762
776
|
|
|
763
|
-
declare const VERSION = "0.
|
|
777
|
+
declare const VERSION = "0.4.2";
|
|
764
778
|
|
|
765
|
-
export { AsyncClient, type AsyncVideoAccepted, AuthenticationError, Billing, type BillingInfo, type CheckoutOptions, Client, type ClientOptions, type DashboardResponse, type DeploymentCostResponse, type DeploymentCreateOptions, type DeploymentGpuInfo, type DeploymentGpuListResponse, type DeploymentInfo, type DeploymentListResponse, type DeploymentLogEntry, type DeploymentLogsResponse, type DeploymentRunRequest, Deployments, type FeaturedSection, Generate, type GenerateResult, type HfModelInfo, HfModels, type HfModelsListOptions, type ImageResult, Images, type ImagesGenerateOptions, type Invitation, Invitations, type Member, type MemberPermissions, Members, type ModelInfo, type ModelPricing, Models, type ModelsListOptions, type ModelsResponse, type Organization, type OrganizationSummary, Organizations, type PricingResponse, type ProviderBalanceItem, type ProviderBalancesResponse, ProviderError, type ProviderKeyInfo, type ProviderKeysResponse, type ProviderValidationResult, Providers, RateLimitError, type RequestStatusResult, Requests, type StreamStatusEvent, Usage, type UsageSummary, VERSION, VIDEO_MODEL_PRESETS, ValidationError, type VideoResult, Videos, type VideosGenerateOptions, VisgateConnectionError, VisgateError, type VisgateErrorDetails, VisgateTimeoutError, billingInfoFromResponse, deploymentCostResponseFromResponse, deploymentGpuInfoFromResponse, deploymentGpuListResponseFromResponse, deploymentInfoFromResponse, deploymentListResponseFromResponse, deploymentLogsResponseFromResponse, featuredSectionFromResponse, generateResultFromResponse, imageResultFromResponse, invitationFromResponse, memberFromResponse, modelInfoFromResponse, modelPricingFromResponse, modelsResponseFromResponse, organizationFromResponse, organizationSummaryFromResponse, pricingResponseFromResponse, providerBalanceItemFromResponse, providerBalancesResponseFromResponse, providerKeyInfoFromResponse, providerKeysResponseFromResponse, providerValidationResultFromResponse, requestStatusFromResponse, usageSummaryFromResponse, videoResultFromResponse };
|
|
779
|
+
export { AsyncClient, type AsyncVideoAccepted, AuthenticationError, Billing, type BillingInfo, type CheckoutOptions, Client, type ClientOptions, type DashboardResponse, type DeploymentCostResponse, type DeploymentCreateOptions, type DeploymentGpuInfo, type DeploymentGpuListResponse, type DeploymentInfo, type DeploymentListResponse, type DeploymentLogEntry, type DeploymentLogsResponse, type DeploymentRunRequest, Deployments, type FeaturedSection, Generate, type GenerateResult, type HfModelInfo, HfModels, type HfModelsListOptions, type ImageResult, Images, type ImagesGenerateOptions, type Invitation, type InvitationPreview, Invitations, type Member, type MemberPermissions, Members, type ModelInfo, type ModelPricing, Models, type ModelsListOptions, type ModelsResponse, type Organization, type OrganizationSummary, Organizations, type PricingResponse, type ProviderBalanceItem, type ProviderBalancesResponse, ProviderError, type ProviderKeyInfo, type ProviderKeysResponse, type ProviderValidationResult, Providers, RateLimitError, type RequestStatusResult, Requests, type StreamStatusEvent, Usage, type UsageSummary, VERSION, VIDEO_MODEL_PRESETS, ValidationError, type VideoResult, Videos, type VideosGenerateOptions, VisgateConnectionError, VisgateError, type VisgateErrorDetails, VisgateTimeoutError, billingInfoFromResponse, deploymentCostResponseFromResponse, deploymentGpuInfoFromResponse, deploymentGpuListResponseFromResponse, deploymentInfoFromResponse, deploymentListResponseFromResponse, deploymentLogsResponseFromResponse, featuredSectionFromResponse, generateResultFromResponse, imageResultFromResponse, invitationFromResponse, memberFromResponse, modelInfoFromResponse, modelPricingFromResponse, modelsResponseFromResponse, organizationFromResponse, organizationSummaryFromResponse, pricingResponseFromResponse, providerBalanceItemFromResponse, providerBalancesResponseFromResponse, providerKeyInfoFromResponse, providerKeysResponseFromResponse, providerValidationResultFromResponse, requestStatusFromResponse, usageSummaryFromResponse, videoResultFromResponse };
|
package/dist/index.d.ts
CHANGED
|
@@ -298,8 +298,18 @@ declare class HfModels {
|
|
|
298
298
|
list(options?: HfModelsListOptions): Promise<HfModelInfo[]>;
|
|
299
299
|
}
|
|
300
300
|
|
|
301
|
-
/** Invitations resource: create, list, cancel, accept, decline */
|
|
301
|
+
/** Invitations resource: create, list, cancel, accept, decline, getPreview, listSent */
|
|
302
302
|
|
|
303
|
+
/** Public invitation preview (no auth). Does not include invitee email. */
|
|
304
|
+
interface InvitationPreview {
|
|
305
|
+
id: string;
|
|
306
|
+
organizationId: string;
|
|
307
|
+
organizationName: string;
|
|
308
|
+
role: string;
|
|
309
|
+
invitedByEmail: string;
|
|
310
|
+
status: string;
|
|
311
|
+
expiresAt: string;
|
|
312
|
+
}
|
|
303
313
|
interface Invitation {
|
|
304
314
|
id: string;
|
|
305
315
|
organizationId: string;
|
|
@@ -323,6 +333,10 @@ declare class Invitations {
|
|
|
323
333
|
cancel(orgId: string, inviteId: string): Promise<void>;
|
|
324
334
|
/** List pending invitations for the current user. */
|
|
325
335
|
listPending(): Promise<Invitation[]>;
|
|
336
|
+
/** Public preview of an invitation (no auth). Use for invite landing pages. */
|
|
337
|
+
getPreview(inviteId: string): Promise<InvitationPreview>;
|
|
338
|
+
/** List invitations sent by organizations the current user is a member of. */
|
|
339
|
+
listSent(): Promise<Invitation[]>;
|
|
326
340
|
/** Accept a pending invitation. */
|
|
327
341
|
accept(inviteId: string): Promise<Record<string, unknown>>;
|
|
328
342
|
/** Decline a pending invitation. */
|
|
@@ -760,6 +774,6 @@ declare class VisgateConnectionError extends VisgateError {
|
|
|
760
774
|
* Visgate JavaScript/TypeScript SDK — unified client for the Visgate vision AI gateway.
|
|
761
775
|
*/
|
|
762
776
|
|
|
763
|
-
declare const VERSION = "0.
|
|
777
|
+
declare const VERSION = "0.4.2";
|
|
764
778
|
|
|
765
|
-
export { AsyncClient, type AsyncVideoAccepted, AuthenticationError, Billing, type BillingInfo, type CheckoutOptions, Client, type ClientOptions, type DashboardResponse, type DeploymentCostResponse, type DeploymentCreateOptions, type DeploymentGpuInfo, type DeploymentGpuListResponse, type DeploymentInfo, type DeploymentListResponse, type DeploymentLogEntry, type DeploymentLogsResponse, type DeploymentRunRequest, Deployments, type FeaturedSection, Generate, type GenerateResult, type HfModelInfo, HfModels, type HfModelsListOptions, type ImageResult, Images, type ImagesGenerateOptions, type Invitation, Invitations, type Member, type MemberPermissions, Members, type ModelInfo, type ModelPricing, Models, type ModelsListOptions, type ModelsResponse, type Organization, type OrganizationSummary, Organizations, type PricingResponse, type ProviderBalanceItem, type ProviderBalancesResponse, ProviderError, type ProviderKeyInfo, type ProviderKeysResponse, type ProviderValidationResult, Providers, RateLimitError, type RequestStatusResult, Requests, type StreamStatusEvent, Usage, type UsageSummary, VERSION, VIDEO_MODEL_PRESETS, ValidationError, type VideoResult, Videos, type VideosGenerateOptions, VisgateConnectionError, VisgateError, type VisgateErrorDetails, VisgateTimeoutError, billingInfoFromResponse, deploymentCostResponseFromResponse, deploymentGpuInfoFromResponse, deploymentGpuListResponseFromResponse, deploymentInfoFromResponse, deploymentListResponseFromResponse, deploymentLogsResponseFromResponse, featuredSectionFromResponse, generateResultFromResponse, imageResultFromResponse, invitationFromResponse, memberFromResponse, modelInfoFromResponse, modelPricingFromResponse, modelsResponseFromResponse, organizationFromResponse, organizationSummaryFromResponse, pricingResponseFromResponse, providerBalanceItemFromResponse, providerBalancesResponseFromResponse, providerKeyInfoFromResponse, providerKeysResponseFromResponse, providerValidationResultFromResponse, requestStatusFromResponse, usageSummaryFromResponse, videoResultFromResponse };
|
|
779
|
+
export { AsyncClient, type AsyncVideoAccepted, AuthenticationError, Billing, type BillingInfo, type CheckoutOptions, Client, type ClientOptions, type DashboardResponse, type DeploymentCostResponse, type DeploymentCreateOptions, type DeploymentGpuInfo, type DeploymentGpuListResponse, type DeploymentInfo, type DeploymentListResponse, type DeploymentLogEntry, type DeploymentLogsResponse, type DeploymentRunRequest, Deployments, type FeaturedSection, Generate, type GenerateResult, type HfModelInfo, HfModels, type HfModelsListOptions, type ImageResult, Images, type ImagesGenerateOptions, type Invitation, type InvitationPreview, Invitations, type Member, type MemberPermissions, Members, type ModelInfo, type ModelPricing, Models, type ModelsListOptions, type ModelsResponse, type Organization, type OrganizationSummary, Organizations, type PricingResponse, type ProviderBalanceItem, type ProviderBalancesResponse, ProviderError, type ProviderKeyInfo, type ProviderKeysResponse, type ProviderValidationResult, Providers, RateLimitError, type RequestStatusResult, Requests, type StreamStatusEvent, Usage, type UsageSummary, VERSION, VIDEO_MODEL_PRESETS, ValidationError, type VideoResult, Videos, type VideosGenerateOptions, VisgateConnectionError, VisgateError, type VisgateErrorDetails, VisgateTimeoutError, billingInfoFromResponse, deploymentCostResponseFromResponse, deploymentGpuInfoFromResponse, deploymentGpuListResponseFromResponse, deploymentInfoFromResponse, deploymentListResponseFromResponse, deploymentLogsResponseFromResponse, featuredSectionFromResponse, generateResultFromResponse, imageResultFromResponse, invitationFromResponse, memberFromResponse, modelInfoFromResponse, modelPricingFromResponse, modelsResponseFromResponse, organizationFromResponse, organizationSummaryFromResponse, pricingResponseFromResponse, providerBalanceItemFromResponse, providerBalancesResponseFromResponse, providerKeyInfoFromResponse, providerKeysResponseFromResponse, providerValidationResultFromResponse, requestStatusFromResponse, usageSummaryFromResponse, videoResultFromResponse };
|
package/dist/index.js
CHANGED
|
@@ -549,6 +549,17 @@ var HfModels = class {
|
|
|
549
549
|
};
|
|
550
550
|
|
|
551
551
|
// src/resources/invitations.ts
|
|
552
|
+
function invitationPreviewFromResponse(data) {
|
|
553
|
+
return {
|
|
554
|
+
id: data.id ?? "",
|
|
555
|
+
organizationId: data.organization_id ?? "",
|
|
556
|
+
organizationName: data.organization_name ?? "",
|
|
557
|
+
role: data.role ?? "member",
|
|
558
|
+
invitedByEmail: data.invited_by_email ?? "",
|
|
559
|
+
status: data.status ?? "pending",
|
|
560
|
+
expiresAt: data.expires_at ?? ""
|
|
561
|
+
};
|
|
562
|
+
}
|
|
552
563
|
function invitationFromResponse(data) {
|
|
553
564
|
return {
|
|
554
565
|
id: data.id ?? "",
|
|
@@ -587,6 +598,21 @@ var Invitations = class {
|
|
|
587
598
|
const data = await this.client._request("GET", "/invitations/pending");
|
|
588
599
|
return data.map(invitationFromResponse);
|
|
589
600
|
}
|
|
601
|
+
/** Public preview of an invitation (no auth). Use for invite landing pages. */
|
|
602
|
+
async getPreview(inviteId) {
|
|
603
|
+
const url = `${this.client.baseUrl}/invite/${encodeURIComponent(inviteId)}`;
|
|
604
|
+
const response = await fetch(url, {
|
|
605
|
+
method: "GET",
|
|
606
|
+
headers: { "Content-Type": "application/json" }
|
|
607
|
+
});
|
|
608
|
+
const data = await handleResponse(response);
|
|
609
|
+
return invitationPreviewFromResponse(data);
|
|
610
|
+
}
|
|
611
|
+
/** List invitations sent by organizations the current user is a member of. */
|
|
612
|
+
async listSent() {
|
|
613
|
+
const data = await this.client._request("GET", "/invitations/sent");
|
|
614
|
+
return data.map(invitationFromResponse);
|
|
615
|
+
}
|
|
590
616
|
/** Accept a pending invitation. */
|
|
591
617
|
async accept(inviteId) {
|
|
592
618
|
return await this.client._request("POST", `/invitations/${encodeURIComponent(inviteId)}/accept`);
|
|
@@ -980,7 +1006,7 @@ var DEFAULT_BASE_URL = "https://visgateai.com/api/v1";
|
|
|
980
1006
|
var DEFAULT_TIMEOUT = 12e4;
|
|
981
1007
|
var DEFAULT_MAX_RETRIES = 2;
|
|
982
1008
|
var RETRYABLE_STATUS_CODES = /* @__PURE__ */ new Set([429, 500, 502, 503, 504]);
|
|
983
|
-
var SDK_VERSION = "0.
|
|
1009
|
+
var SDK_VERSION = "0.4.2";
|
|
984
1010
|
function getVersion() {
|
|
985
1011
|
try {
|
|
986
1012
|
if (typeof __VERSION__ !== "undefined") return __VERSION__;
|
|
@@ -1182,7 +1208,7 @@ var AsyncClient = class extends Client {
|
|
|
1182
1208
|
};
|
|
1183
1209
|
|
|
1184
1210
|
// src/index.ts
|
|
1185
|
-
var VERSION = "0.
|
|
1211
|
+
var VERSION = "0.4.2";
|
|
1186
1212
|
|
|
1187
1213
|
export { AsyncClient, AuthenticationError, Billing, Client, Deployments, Generate, HfModels, Images, Invitations, Members, Models, Organizations, ProviderError, Providers, RateLimitError, Requests, Usage, VERSION, VIDEO_MODEL_PRESETS, ValidationError, Videos, VisgateConnectionError, VisgateError, VisgateTimeoutError, billingInfoFromResponse, deploymentCostResponseFromResponse, deploymentGpuInfoFromResponse, deploymentGpuListResponseFromResponse, deploymentInfoFromResponse, deploymentListResponseFromResponse, deploymentLogsResponseFromResponse, featuredSectionFromResponse, generateResultFromResponse, imageResultFromResponse, invitationFromResponse, memberFromResponse, modelInfoFromResponse, modelPricingFromResponse, modelsResponseFromResponse, organizationFromResponse, organizationSummaryFromResponse, pricingResponseFromResponse, providerBalanceItemFromResponse, providerBalancesResponseFromResponse, providerKeyInfoFromResponse, providerKeysResponseFromResponse, providerValidationResultFromResponse, requestStatusFromResponse, usageSummaryFromResponse, videoResultFromResponse };
|
|
1188
1214
|
//# sourceMappingURL=index.js.map
|