@lobehub/market-sdk 0.33.6 → 0.34.0-beta.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/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { AgentItem, UserCredSummary, MarketItemBase, PluginConnectionType, InstallFailureAnalysisQuery, InstallFailureAnalysis, RangeQuery, RangeStats, TopPluginsQuery, TopPlugin, PluginManifest, AdminPluginItem, AdminPluginItemDetail, PluginVersion, PluginVersionLocalization, AdminDeploymentOption, InstallationDetails, SystemDependency, IncompleteI18nPlugin, CreateSkillCollectionRequest, AdminSkillCollectionDetail, AdminSkillCollectionListQuery, AdminSkillCollectionListResponse, BatchUpsertSkillCollectionLocalizationsRequest, SkillCollectionLocalizationBatchResponse, SkillCollectionLocalization, UpdateSkillCollectionRequest, UpsertSkillCollectionLocalizationRequest, SitemapResponse, AgentEventRequest, SkillCredStatus, InjectCredsRequest, InjectCredsResponse, InjectCredsForSkillRequest, InjectCredsForSkillResponse, CategoryListQuery, CategoryItem, PluginItemDetail, InstallReportRequest, InstallReportResponse, CallReportRequest, CallReportResponse, PluginEventRequest, CloudGatewayRequest, CloudGatewayResponse } from '@lobehub/market-types';
2
+ import { AgentItem, UserCredSummary, MarketItemBase, PluginConnectionType, InstallFailureAnalysisQuery, InstallFailureAnalysis, RangeQuery, RangeStats, TopPluginsQuery, TopPlugin, PluginManifest, AdminPluginItem, AdminPluginItemDetail, PluginVersion, PluginVersionLocalization, AdminDeploymentOption, InstallationDetails, SystemDependency, IncompleteI18nPlugin, CreateSkillCollectionRequest, AdminSkillCollectionDetail, AdminSkillCollectionListQuery, AdminSkillCollectionListResponse, BatchUpsertSkillCollectionLocalizationsRequest, SkillCollectionLocalizationBatchResponse, SkillCollectionLocalization, UpdateSkillCollectionRequest, UpsertSkillCollectionLocalizationRequest, SitemapResponse, AgentEventRequest, SkillCredStatus, InjectCredsRequest, InjectCredsResponse, InjectCredsForSkillRequest, InjectCredsForSkillResponse, CategoryListQuery, CategoryItem, PluginItemDetail, InstallReportRequest, InstallReportResponse, CallReportRequest, CallReportResponse, PluginEventRequest, CloudGatewayRequest, CloudGatewayResponse, MyOrganizationItem, CreateOrganizationRequest, CreateOrganizationResponse, UpdateOrganizationRequest, OrganizationItem, OrganizationMemberItem, OrganizationMemberRole, AddMemberResponse, UpdateMemberRoleResponse, ReconcileMembersRequest, ReconcileMembersResponse } from '@lobehub/market-types';
3
3
  export * from '@lobehub/market-types';
4
4
  export { CategoryItem, CategoryListQuery, CategoryListResponse, CredType, InjectCredsForSkillRequest, InjectCredsForSkillResponse, InjectCredsRequest, InjectCredsResponse, InjectedFileInfo, SkillCredStatus, UserCredSummary } from '@lobehub/market-types';
5
5
  import { JSONSchema7 } from 'json-schema';
@@ -1547,6 +1547,24 @@ interface MarketSDKOptions {
1547
1547
  * @default 'en-US'
1548
1548
  */
1549
1549
  defaultLocale?: string;
1550
+ /**
1551
+ * Owner account id for organization-scoped operations.
1552
+ *
1553
+ * When set, the SDK sends the `x-lobe-owner-account-id` header on every
1554
+ * request, instructing the Market API to attribute reads/writes to the
1555
+ * given organization account instead of the actor's personal account.
1556
+ * The Market backend rejects the call with 403 if the authenticated user
1557
+ * is not a member of that organization.
1558
+ *
1559
+ * @example
1560
+ * ```typescript
1561
+ * const sdk = new MarketSDK({
1562
+ * accessToken: userToken,
1563
+ * ownerAccountId: workspaceMarketAccountId,
1564
+ * });
1565
+ * ```
1566
+ */
1567
+ ownerAccountId?: number;
1550
1568
  /**
1551
1569
  * Base URL for root path
1552
1570
  */
@@ -3562,6 +3580,78 @@ interface UserAgentGroupItem {
3562
3580
  /** Current version number */
3563
3581
  versionNumber?: number;
3564
3582
  }
3583
+ /**
3584
+ * User Skill Item
3585
+ *
3586
+ * Represents a simplified skill item for user profile display
3587
+ */
3588
+ interface UserSkillItem {
3589
+ /** Skill category */
3590
+ category?: string;
3591
+ /** Creation timestamp */
3592
+ createdAt: string;
3593
+ /** Skill description */
3594
+ description?: string;
3595
+ /** Skill icon URL */
3596
+ icon?: string;
3597
+ /** Skill database ID */
3598
+ id: number;
3599
+ /** Skill unique identifier */
3600
+ identifier: string;
3601
+ /** Total install count */
3602
+ installCount: number;
3603
+ /** Whether the skill is featured */
3604
+ isFeatured: boolean;
3605
+ /** Whether the skill is officially maintained */
3606
+ isOfficial: boolean;
3607
+ /** Whether the skill has been validated */
3608
+ isValidated: boolean;
3609
+ /** Skill name */
3610
+ name: string;
3611
+ /** Publish status */
3612
+ status: string;
3613
+ /** Free-form tags */
3614
+ tags?: string[];
3615
+ /** Last update timestamp */
3616
+ updatedAt: string;
3617
+ }
3618
+ /**
3619
+ * User Plugin Item
3620
+ *
3621
+ * Represents a simplified plugin (MCP) item for user profile display
3622
+ */
3623
+ interface UserPluginItem {
3624
+ /** Avatar emoji or URL */
3625
+ avatar?: string;
3626
+ /** Plugin category */
3627
+ category?: string;
3628
+ /** Creation timestamp */
3629
+ createdAt: string;
3630
+ /** Plugin description */
3631
+ description?: string;
3632
+ /** Plugin database ID */
3633
+ id: number;
3634
+ /** Plugin unique identifier */
3635
+ identifier: string;
3636
+ /** Total install count */
3637
+ installCount: number;
3638
+ /** Whether the plugin has been claimed by its owner */
3639
+ isClaimed: boolean;
3640
+ /** Whether the plugin is featured */
3641
+ isFeatured: boolean;
3642
+ /** Whether the plugin is officially maintained */
3643
+ isOfficial: boolean;
3644
+ /** Whether the plugin has been validated */
3645
+ isValidated: boolean;
3646
+ /** Plugin name */
3647
+ name: string;
3648
+ /** Publish status */
3649
+ status: string;
3650
+ /** Free-form tags */
3651
+ tags?: string[];
3652
+ /** Last update timestamp */
3653
+ updatedAt: string;
3654
+ }
3565
3655
  /**
3566
3656
  * User Info Query
3567
3657
  *
@@ -3589,6 +3679,10 @@ interface UserInfoResponse {
3589
3679
  forkedAgentGroups: UserAgentGroupItem[];
3590
3680
  /** List of user's forked agents (excludes shallow forks) */
3591
3681
  forkedAgents: UserAgentItem[];
3682
+ /** List of user's owned plugins (MCPs) */
3683
+ plugins: UserPluginItem[];
3684
+ /** List of user's owned skills */
3685
+ skills: UserSkillItem[];
3592
3686
  /** User profile information */
3593
3687
  user: UserProfile;
3594
3688
  }
@@ -3927,6 +4021,82 @@ interface SubmitFeedbackResponse {
3927
4021
  success: boolean;
3928
4022
  }
3929
4023
 
4024
+ /**
4025
+ * Organization-related type definitions for LobeHub Market SDK
4026
+ *
4027
+ * Public-facing types for the `/v1/organization/info/:id` endpoint. The item
4028
+ * shapes (agents/groups/skills/plugins) intentionally re-export their `User*`
4029
+ * equivalents from `user.ts` — they describe the same rows, owned by an
4030
+ * account whose `type='organization'`.
4031
+ */
4032
+
4033
+ /**
4034
+ * Organization Profile
4035
+ *
4036
+ * Public-facing organization metadata returned alongside the org's published
4037
+ * content. `id` is the underlying `accounts.id` (same primary key space as
4038
+ * {@link UserProfile.id}); cloud workspaces map to these via
4039
+ * `workspace_market_identities.marketAccountId`.
4040
+ */
4041
+ interface OrganizationProfile {
4042
+ /** Organization avatar URL */
4043
+ avatarUrl: string | null;
4044
+ /** Organization banner/background image URL */
4045
+ bannerUrl: string | null;
4046
+ /** Account creation timestamp (ISO string) */
4047
+ createdAt: string;
4048
+ /** Long-form description / bio */
4049
+ description: string | null;
4050
+ /** Organization display name */
4051
+ displayName: string | null;
4052
+ /** Contact email (admin-curated) */
4053
+ email: string | null;
4054
+ /** Number of followers (always 0 today — orgs are not currently followable) */
4055
+ followerCount: number;
4056
+ /** Number of accounts this org follows (always 0 today) */
4057
+ followingCount: number;
4058
+ /** Account ID (primary key, alias of `accounts.id`) */
4059
+ id: number;
4060
+ /** Globally-unique namespace; cloud workspace mirrors use `ws-<slug>` */
4061
+ namespace: string;
4062
+ /** Always `'organization'` — present so consumers can branch off the same field shape as UserProfile */
4063
+ type: 'organization';
4064
+ /** Last profile update timestamp (ISO string) */
4065
+ updatedAt: string | null;
4066
+ /** Public website URL */
4067
+ websiteUrl: string | null;
4068
+ }
4069
+ /**
4070
+ * Organization Info Query
4071
+ *
4072
+ * Query parameters for `getOrganizationInfo`
4073
+ */
4074
+ interface OrganizationInfoQuery {
4075
+ /** Locale for localized content */
4076
+ locale?: string;
4077
+ }
4078
+ /**
4079
+ * Organization Info Response
4080
+ *
4081
+ * Response payload from `GET /api/v1/organization/info/:id`.
4082
+ *
4083
+ * Unlike {@link UserInfoResponse}, there are no `favorite*` or `forked*`
4084
+ * fields — favoriting and forking happen at the member (user) level, not the
4085
+ * org level.
4086
+ */
4087
+ interface OrganizationInfoResponse {
4088
+ /** Organization's published agent groups */
4089
+ agentGroups: UserAgentGroupItem[];
4090
+ /** Organization's published agents */
4091
+ agents: UserAgentItem[];
4092
+ /** Organization profile */
4093
+ organization: OrganizationProfile;
4094
+ /** Organization's published plugins (MCPs) */
4095
+ plugins: UserPluginItem[];
4096
+ /** Organization's published skills */
4097
+ skills: UserSkillItem[];
4098
+ }
4099
+
3930
4100
  /**
3931
4101
  * Base SDK class
3932
4102
  *
@@ -3963,6 +4133,20 @@ declare class BaseSDK {
3963
4133
  * @param sharedTokenState - Optional shared token state object for reuse across services
3964
4134
  */
3965
4135
  constructor(options?: MarketSDKOptions, sharedHeaders?: Record<string, string>, sharedTokenState?: SharedTokenState);
4136
+ /**
4137
+ * Sets the owner account id header for subsequent requests.
4138
+ *
4139
+ * Mirrors the constructor `ownerAccountId` option. Useful when the
4140
+ * organization context is not known at SDK construction time.
4141
+ *
4142
+ * @param ownerAccountId - The organization account id to act on behalf of
4143
+ */
4144
+ setOwnerAccountId(ownerAccountId: number): void;
4145
+ /**
4146
+ * Clears the owner account id header. Subsequent requests will be
4147
+ * attributed to the actor's personal account.
4148
+ */
4149
+ clearOwnerAccountId(): void;
3966
4150
  /**
3967
4151
  * Sends an HTTP request to the API and handles the response
3968
4152
  *
@@ -5127,6 +5311,130 @@ declare class PluginEnvService extends BaseSDK {
5127
5311
  }>;
5128
5312
  }
5129
5313
 
5314
+ /**
5315
+ * Organization membership-authority source
5316
+ */
5317
+ type AdminOrganizationSource = 'native' | 'workspace';
5318
+ /**
5319
+ * Admin organization list query parameters
5320
+ */
5321
+ interface AdminOrganizationListQueryParams extends AdminListQueryParams {
5322
+ /** Filter by membership-authority source (defaults to all) */
5323
+ source?: AdminOrganizationSource | 'all';
5324
+ }
5325
+ /**
5326
+ * Organization list item in admin context
5327
+ */
5328
+ interface AdminOrganizationItem {
5329
+ accountId: number;
5330
+ archivedAt: string | null;
5331
+ avatarUrl: string | null;
5332
+ createdAt: string;
5333
+ description: string | null;
5334
+ displayName: string | null;
5335
+ email: string | null;
5336
+ memberCount: number;
5337
+ namespace: string;
5338
+ source: AdminOrganizationSource;
5339
+ updatedAt: string | null;
5340
+ websiteUrl: string | null;
5341
+ }
5342
+ /**
5343
+ * Organization member in admin context
5344
+ */
5345
+ interface AdminOrganizationMember {
5346
+ avatarUrl: string | null;
5347
+ createdAt: string;
5348
+ displayName: string | null;
5349
+ email: string | null;
5350
+ namespace: string | null;
5351
+ role: 'admin' | 'member';
5352
+ userAccountId: number;
5353
+ }
5354
+ /**
5355
+ * Organization detail in admin context (profile + members + published content)
5356
+ */
5357
+ interface AdminOrganizationDetail extends AdminOrganizationItem {
5358
+ agentGroups?: unknown[];
5359
+ agents?: unknown[];
5360
+ members: AdminOrganizationMember[];
5361
+ plugins?: unknown[];
5362
+ skills?: unknown[];
5363
+ }
5364
+ /**
5365
+ * Organization update parameters
5366
+ */
5367
+ interface AdminOrganizationUpdateParams {
5368
+ avatarUrl?: string;
5369
+ bannerUrl?: string | null;
5370
+ description?: string;
5371
+ displayName?: string;
5372
+ email?: string;
5373
+ websiteUrl?: string;
5374
+ }
5375
+ /**
5376
+ * Organization Management Service
5377
+ *
5378
+ * Provides administrative functionality for managing organization accounts in the
5379
+ * marketplace, including the workspace-mirrored orgs created by LobeHub Cloud.
5380
+ */
5381
+ declare class OrganizationService$1 extends BaseSDK {
5382
+ /**
5383
+ * Retrieves a paginated list of organizations with admin details
5384
+ *
5385
+ * @param params - Query parameters for filtering, search and pagination
5386
+ * @returns Promise resolving to the organization list response
5387
+ */
5388
+ getOrganizations(params?: AdminOrganizationListQueryParams): Promise<AdminListResponse<AdminOrganizationItem>>;
5389
+ /**
5390
+ * Retrieves a single organization detail (profile + members + published content)
5391
+ *
5392
+ * @param id - Organization account ID
5393
+ * @returns Promise resolving to the organization detail
5394
+ */
5395
+ getOrganization(id: number): Promise<{
5396
+ data: AdminOrganizationDetail;
5397
+ }>;
5398
+ /**
5399
+ * Lists an organization's members
5400
+ *
5401
+ * @param id - Organization account ID
5402
+ * @returns Promise resolving to the member list
5403
+ */
5404
+ getOrganizationMembers(id: number): Promise<{
5405
+ data: AdminOrganizationMember[];
5406
+ total: number;
5407
+ }>;
5408
+ /**
5409
+ * Updates an organization's information
5410
+ *
5411
+ * @param id - Organization account ID
5412
+ * @param data - Fields to update
5413
+ * @returns Promise resolving to the updated organization
5414
+ */
5415
+ updateOrganization(id: number, data: AdminOrganizationUpdateParams): Promise<{
5416
+ data: AdminOrganizationItem;
5417
+ }>;
5418
+ /**
5419
+ * Archives (soft-disables) an organization
5420
+ *
5421
+ * @param id - Organization account ID
5422
+ * @returns Promise resolving to the archived organization
5423
+ */
5424
+ archiveOrganization(id: number): Promise<{
5425
+ data: AdminOrganizationItem;
5426
+ }>;
5427
+ /**
5428
+ * Unarchives (restores) an organization
5429
+ *
5430
+ * @param id - Organization account ID
5431
+ * @returns Promise resolving to the restored organization
5432
+ */
5433
+ unarchiveOrganization(id: number): Promise<{
5434
+ data: AdminOrganizationItem;
5435
+ }>;
5436
+ }
5437
+
5130
5438
  /**
5131
5439
  * LobeHub Market Admin SDK Client
5132
5440
  *
@@ -5149,6 +5457,11 @@ declare class MarketAdmin extends BaseSDK {
5149
5457
  * Plugin environment service
5150
5458
  */
5151
5459
  readonly env: PluginEnvService;
5460
+ /**
5461
+ * Organization management service
5462
+ * Provides methods for managing organization accounts (including workspace mirrors)
5463
+ */
5464
+ readonly organizations: OrganizationService$1;
5152
5465
  /**
5153
5466
  * Plugin management service
5154
5467
  * Provides methods for creating, updating, and managing plugins
@@ -7019,6 +7332,199 @@ declare class MarketSkillService extends BaseSDK {
7019
7332
  }>;
7020
7333
  }
7021
7334
 
7335
+ /**
7336
+ * Organization Credentials Service
7337
+ *
7338
+ * Surfaces the org-scoped cred endpoints (`/v1/organizations/:orgId/creds/*`)
7339
+ * with the same method shape as {@link CredService}, but with the org id
7340
+ * bound at construction time so individual calls don't have to thread it
7341
+ * through.
7342
+ *
7343
+ * Don't construct directly — get one from
7344
+ * {@link OrganizationService.creds | `market.organizations.creds(orgId)`}.
7345
+ * That factory wires the shared headers / token state so the org-creds
7346
+ * service reuses the same auth token refresh state as the rest of the SDK.
7347
+ *
7348
+ * @example
7349
+ * ```typescript
7350
+ * const orgCreds = market.organizations.creds(42);
7351
+ * const { data } = await orgCreds.list();
7352
+ * await orgCreds.createKV({ key: 'OPENAI_KEY', name: 'OpenAI', type: 'kv-env', values: { OPENAI_KEY: 'sk-...' } });
7353
+ * ```
7354
+ */
7355
+ declare class OrganizationCredsService extends BaseSDK {
7356
+ /**
7357
+ * Numeric organization account ID this service is bound to. Stored so every
7358
+ * URL builder method below can prefix `/v1/organizations/${orgId}/`.
7359
+ */
7360
+ private readonly orgId;
7361
+ constructor(orgId: number, options?: MarketSDKOptions, sharedHeaders?: Record<string, string>, sharedTokenState?: SharedTokenState);
7362
+ private base;
7363
+ list(options?: globalThis.RequestInit): Promise<ListCredsResponse>;
7364
+ get(id: number, getOptions?: GetCredOptions, options?: globalThis.RequestInit): Promise<CredWithPlaintext>;
7365
+ createKV(data: CreateKVCredRequest, options?: globalThis.RequestInit): Promise<UserCredSummary>;
7366
+ createOAuth(data: CreateOAuthCredRequest, options?: globalThis.RequestInit): Promise<UserCredSummary>;
7367
+ createFile(data: CreateFileCredRequest, options?: globalThis.RequestInit): Promise<UserCredSummary>;
7368
+ update(id: number, data: UpdateCredRequest, options?: globalThis.RequestInit): Promise<UserCredSummary>;
7369
+ delete(id: number, options?: globalThis.RequestInit): Promise<DeleteCredResponse>;
7370
+ deleteByKey(key: string, options?: globalThis.RequestInit): Promise<DeleteCredResponse>;
7371
+ /**
7372
+ * Returns this org's credential status for a skill — which required creds
7373
+ * the org has bound vs. is missing. Reads only; any org member may call.
7374
+ */
7375
+ getSkillCredStatus(skillIdentifier: string, options?: globalThis.RequestInit): Promise<SkillCredStatus[]>;
7376
+ }
7377
+
7378
+ /**
7379
+ * Organization Service
7380
+ *
7381
+ * Read-side access to organization accounts in the LobeHub Marketplace.
7382
+ * Organization accounts share the same `accounts` table as users, but are
7383
+ * mirrored from cloud workspaces (one workspace = one organization). Cloud
7384
+ * publishes everything under `agents.ownerId = orgAccountId`; this service
7385
+ * surfaces the org profile + published content in a single round-trip.
7386
+ */
7387
+ declare class OrganizationService extends BaseSDK {
7388
+ /**
7389
+ * SDK options captured at construction time. Re-passed to org-scoped sub-
7390
+ * services (e.g. {@link OrganizationCredsService}) created via {@link creds}
7391
+ * so they pick up the same baseURL / locale / api key configuration as the
7392
+ * top-level `MarketSDK` instance.
7393
+ */
7394
+ private readonly initOptions;
7395
+ /**
7396
+ * Shared token state passed from `MarketSDK`. Forwarded to sub-services so
7397
+ * refresh-token cycles initiated by other services (e.g. `auth`) are visible
7398
+ * here too.
7399
+ */
7400
+ private readonly tokenState?;
7401
+ constructor(options?: MarketSDKOptions, sharedHeaders?: Record<string, string>, sharedTokenState?: SharedTokenState);
7402
+ /**
7403
+ * Returns an org-scoped credentials sub-service bound to `orgId`.
7404
+ *
7405
+ * The returned service hits `/v1/organizations/:orgId/creds/*` and shares
7406
+ * this `OrganizationService`'s headers + token state, so it inherits the
7407
+ * same auth context as the rest of the SDK (no need to re-attach an access
7408
+ * token).
7409
+ *
7410
+ * Returns a fresh instance per call; suitable for short-lived UIs where the
7411
+ * orgId varies. For long-lived use, cache the returned service.
7412
+ *
7413
+ * @example
7414
+ * ```typescript
7415
+ * const orgCreds = market.organizations.creds(42);
7416
+ * await orgCreds.list();
7417
+ * ```
7418
+ */
7419
+ creds(orgId: number): OrganizationCredsService;
7420
+ /**
7421
+ * Retrieves an organization's public profile and everything it has
7422
+ * published — agents, agent groups, skills, plugins.
7423
+ *
7424
+ * Public endpoint; authentication is optional. If the caller is an
7425
+ * authenticated admin of the organization, the response additionally
7426
+ * includes unpublished/private content (useful for the workspace owner's
7427
+ * own Community page).
7428
+ *
7429
+ * @param idOrNamespace - The account ID (number) or organization namespace string (e.g. `ws-acme`)
7430
+ * @param params - Query parameters for locale
7431
+ * @param options - Optional request options
7432
+ * @returns Promise resolving to the organization info response
7433
+ */
7434
+ getOrganizationInfo(idOrNamespace: number | string, params?: OrganizationInfoQuery, options?: globalThis.RequestInit): Promise<OrganizationInfoResponse>;
7435
+ /**
7436
+ * Lists the organizations the authenticated user belongs to, each annotated
7437
+ * with the caller's membership role. Excludes archived organizations.
7438
+ *
7439
+ * @returns Promise resolving to the user's organizations
7440
+ */
7441
+ listMyOrganizations(options?: globalThis.RequestInit): Promise<MyOrganizationItem[]>;
7442
+ /**
7443
+ * Idempotently creates an organization (mirrors a cloud workspace).
7444
+ *
7445
+ * Trusted-client only — construct the SDK with `{ trustedClientToken }`. Uses
7446
+ * `clerkId` as the idempotency key; a second call with the same `clerkId`
7447
+ * returns the existing org with `created: false` (and revives it if archived).
7448
+ *
7449
+ * @param data - Organization fields + optional initial members
7450
+ * @returns The created/existing organization and whether it was newly created
7451
+ */
7452
+ createOrganization(data: CreateOrganizationRequest, options?: globalThis.RequestInit): Promise<CreateOrganizationResponse>;
7453
+ /**
7454
+ * Updates an organization's metadata. Requires org admin (or trusted client).
7455
+ *
7456
+ * @param orgId - Organization account id
7457
+ * @param data - Fields to update
7458
+ * @returns The updated organization
7459
+ */
7460
+ updateOrganization(orgId: number, data: UpdateOrganizationRequest, options?: globalThis.RequestInit): Promise<OrganizationItem>;
7461
+ /**
7462
+ * Soft-disables an organization (e.g. its cloud workspace was deleted).
7463
+ * Trusted-client only. Reversible; creds and published content are preserved.
7464
+ *
7465
+ * @param orgId - Organization account id
7466
+ * @returns The archived organization
7467
+ */
7468
+ archiveOrganization(orgId: number, options?: globalThis.RequestInit): Promise<OrganizationItem>;
7469
+ /**
7470
+ * Reactivates a previously archived organization. Trusted-client only.
7471
+ *
7472
+ * @param orgId - Organization account id
7473
+ * @returns The reactivated organization
7474
+ */
7475
+ unarchiveOrganization(orgId: number, options?: globalThis.RequestInit): Promise<OrganizationItem>;
7476
+ /**
7477
+ * Lists the members of an organization. Any authenticated org member may call.
7478
+ *
7479
+ * @param orgId - Organization account id
7480
+ * @returns Hydrated member rows
7481
+ */
7482
+ listMembers(orgId: number, options?: globalThis.RequestInit): Promise<OrganizationMemberItem[]>;
7483
+ /**
7484
+ * Adds a member to an organization. Trusted-client only. Idempotent: if the
7485
+ * user is already a member, the existing role is preserved (`added: false`).
7486
+ *
7487
+ * @param orgId - Organization account id
7488
+ * @param userAccountId - The user's account id
7489
+ * @param role - Role to grant (defaults server-side to `member`)
7490
+ * @returns Whether the member was newly added and their effective role
7491
+ */
7492
+ addMember(orgId: number, userAccountId: number, role?: OrganizationMemberRole, options?: globalThis.RequestInit): Promise<AddMemberResponse>;
7493
+ /**
7494
+ * Removes a member from an organization. Trusted-client only. Refuses to
7495
+ * remove the last admin (server returns 409).
7496
+ *
7497
+ * @param orgId - Organization account id
7498
+ * @param userAccountId - The user's account id
7499
+ * @returns Whether a membership row was removed
7500
+ */
7501
+ removeMember(orgId: number, userAccountId: number, options?: globalThis.RequestInit): Promise<{
7502
+ removed: boolean;
7503
+ }>;
7504
+ /**
7505
+ * Updates a member's role. Trusted-client only. Refuses to demote the last
7506
+ * admin (server returns 409).
7507
+ *
7508
+ * @param orgId - Organization account id
7509
+ * @param userAccountId - The user's account id
7510
+ * @param role - The new role
7511
+ * @returns The effective role and whether it changed
7512
+ */
7513
+ updateMemberRole(orgId: number, userAccountId: number, role: OrganizationMemberRole, options?: globalThis.RequestInit): Promise<UpdateMemberRoleResponse>;
7514
+ /**
7515
+ * Reconciles the full member list against a desired snapshot (idempotent).
7516
+ * Trusted-client only — the canonical way for Cloud to mirror a workspace's
7517
+ * complete membership: absent members are removed, missing ones added, and
7518
+ * changed roles updated, all in one transaction. Rejects a snapshot with no
7519
+ * admin (server returns 409).
7520
+ *
7521
+ * @param orgId - Organization account id
7522
+ * @param members - The complete desired member list
7523
+ * @returns Counts of added / removed / updated members and skipped ids
7524
+ */
7525
+ reconcileMembers(orgId: number, members: ReconcileMembersRequest['members'], options?: globalThis.RequestInit): Promise<ReconcileMembersResponse>;
7526
+ }
7527
+
7022
7528
  /**
7023
7529
  * User Service
7024
7530
  *
@@ -7543,6 +8049,14 @@ declare class MarketSDK extends BaseSDK {
7543
8049
  * Provides methods to list, search, retrieve plugin information, and report installation attempts
7544
8050
  */
7545
8051
  readonly plugins: PluginsService;
8052
+ /**
8053
+ * Organizations service for accessing organization-related functionality.
8054
+ * Provides methods to retrieve organization profiles and their published
8055
+ * content (agents, agent groups, skills, plugins).
8056
+ *
8057
+ * Plural accessor for parity with the REST namespace `/v1/organizations/`.
8058
+ */
8059
+ readonly organizations: OrganizationService;
7546
8060
  /**
7547
8061
  * User service for accessing user-related functionality
7548
8062
  * Provides methods to retrieve user profiles and their published agents
@@ -7730,4 +8244,4 @@ declare function buildTrustedClientPayload(params: {
7730
8244
  userId: string;
7731
8245
  }): TrustedClientPayload;
7732
8246
 
7733
- export { type AccountMeta, type AdminListQueryParams, type AdminListResponse, type AdminPluginParams, type AgentCreateRequest, type AgentCreateResponse, type AgentDetailQuery, type AgentExtension, type AgentForkItem, type AgentForkRequest, type AgentForkResponse, type AgentForkSourceResponse, type AgentForksResponse, type AgentGroupCreateRequest, type AgentGroupCreateResponse, type AgentGroupDetail, type AgentGroupDetailQuery, type AgentGroupForkItem, type AgentGroupForkRequest, type AgentGroupForkResponse, type AgentGroupForkSourceResponse, type AgentGroupForksResponse, type AgentGroupItem, type AgentGroupListQuery, type AgentGroupListResponse, type AgentGroupModifyRequest, type AgentGroupModifyResponse, type AgentGroupStatus, type AgentGroupStatusChangeResponse, type AgentGroupVersionCreateRequest, type AgentGroupVersionCreateResponse, type AgentInstallCountRequest, type AgentInstallCountResponse, type AgentInterface, type AgentItemDetail, type AgentListQuery, type AgentListResponse, type AgentModifyRequest, type AgentModifyResponse, type AgentProfileEntity, type AgentProfileResponse, type AgentSecurityRequirement, type AgentSecurityScheme, type AgentSkill, type AgentStatus, type AgentStatusChangeResponse, type AgentUploadRequest, type AgentUploadResponse, type AgentUploadVersion, type AgentVersionCreateRequest, type AgentVersionCreateResponse, type AgentVersionLocalization, type AgentVersionModifyRequest, type AgentVersionModifyResponse, type AuthorizationCodeTokenRequest, type AuthorizeParams, type AuthorizeResponse, type CallSkillToolResponse, type CheckFavoriteQuery, type CheckFavoriteResponse, type CheckFollowQuery, type CheckFollowResponse, type CheckLikeQuery, type CheckLikeResponse, type CimdClientMetadata, type ClientRegistrationError, type ClientRegistrationRequest, type ClientRegistrationResponse, type CodeInterpreterToolName, type CodeInterpreterToolParams, type ConnectProvider, type ConnectProviderDetail, type ConnectProviderScopes, type ConnectionHealth, type ConnectionStats, type CreateFileCredRequest, type CreateKVCredRequest, type CreateMemberAgent, type CreateOAuthCredRequest, type CredWithPlaintext, type DeleteCredResponse, type DiscoveryDocument, type EditLocalFileParams, type ExecuteCodeParams, type ExportFileParams, type FavoriteListResponse, type FavoriteQuery, type FavoriteRequest, type FeedbackClientInfo, type FollowListItem, type FollowListResponse, type FollowRequest, type GetAllConnectionsHealthResponse, type GetAuthorizeUrlParams, type GetCommandOutputParams, type GetConnectProviderResponse, type GetConnectionHealthResponse, type GetConnectionStatsResponse, type GetConnectionStatusResponse, type GetCredOptions, type GetSkillStatusResponse, type GetSkillToolResponse, type GlobLocalFilesParams, type GrepContentParams, type InteractionTargetType, type KillCommandParams, type LikeListResponse, type LikeQuery, type LikeRequest, type ListConnectProvidersResponse, type ListConnectionsResponse, type ListCredsResponse, type ListLocalFilesParams, type ListSkillProvidersResponse, type ListSkillToolsResponse, MarketAPIError, MarketAdmin, type MarketReportGitHubSkillParams, type MarketReportGitHubSkillResponse, type MarketReportSkillInstallParams, type MarketReportSkillInstallResponse, MarketSDK, type MarketSDKOptions, type MarketSkillAuthor, type MarketSkillCategory, type MarketSkillCategoryQuery, type MarketSkillCollectionDetail, type MarketSkillCollectionDetailQuery, type MarketSkillCollectionItemSort, type MarketSkillCollectionListItem, type MarketSkillCollectionListQuery, type MarketSkillCollectionListResponse, type MarketSkillDetail, type MarketSkillDetailQuery, type MarketSkillGitHubMeta, type MarketSkillListItem, type MarketSkillListQuery, type MarketSkillListResponse, type MarketSkillManifest, type MarketSkillResource, type MarketSkillVersionSummary, type MarketSkillVersionsResponse, type MemberAgent, type MoveLocalFilesParams, type MoveOperation, type OAuthConnection, type OAuthTokenResponse, type OwnAgentGroupListQuery, type OwnAgentListQuery, type PaginationQuery, type PluginCommentAuthor, type PluginCommentCreateItem, type PluginCommentCreateResponse, type PluginCommentDeleteResponse, type PluginCommentItem, type PluginCommentListQuery, type PluginCommentListResponse, type PluginCommentRating, type PluginCommentReactionResponse, type PluginI18nImportParams, type PluginI18nImportResponse, type PluginItem, type PluginLatestOwnComment, type PluginListResponse, type PluginLocalization, type PluginQueryParams, type PluginRatingDistribution, type PluginUpdateParams, type PluginVersionCreateParams, type PluginVersionUpdateParams, type ProgrammingLanguage, type ReadLocalFileParams, type RefreshConnectionResponse, type RefreshTokenRequest, type RegisterUserRequest, type RegisterUserResponse, type RegisteredUserProfile, type RenameLocalFileParams, type ReviewStatus, ReviewStatusEnumSchema, type RevokeConnectionResponse, type RunBuildInToolsError, type RunBuildInToolsRequest, type RunBuildInToolsResponse, type RunBuildInToolsSuccessData, type RunCommandParams, SDK_USER_AGENT, SDK_VERSION, type SearchLocalFilesParams, type SharedTokenState, type SkillCallParams, type SkillCommentAuthor, type SkillCommentCreateItem, type SkillCommentCreateResponse, type SkillCommentDeleteResponse, type SkillCommentItem, type SkillCommentListItem, type SkillCommentListQuery, type SkillCommentListResponse, type SkillCommentRating, type SkillErrorResponse, type SkillLatestOwnComment, type SkillProviderInfo, type SkillProviderStatus, type SkillRatingDistribution, type SkillTool, type SkillToolsSource, StatusEnumSchema, type SubmitFeedbackRequest, type SubmitFeedbackResponse, type SuccessResponse, type ToggleLikeResponse, type TrustedClientPayload, type UnclaimedPluginItem, type UpdateAgentProfileRequest, type UpdateAgentProfileResponse, type UpdateCredRequest, type UpdateMemberAgent, type UpdateUserInfoRequest, type UpdateUserInfoResponse, type UserAgentGroupItem, type UserAgentItem, type UserInfoQuery, type UserInfoResponse, type UserProfile, VisibilityEnumSchema, type WriteLocalFileParams, buildTrustedClientPayload, createTrustedClientToken, generateNonce };
8247
+ export { type AccountMeta, type AdminListQueryParams, type AdminListResponse, type AdminPluginParams, type AgentCreateRequest, type AgentCreateResponse, type AgentDetailQuery, type AgentExtension, type AgentForkItem, type AgentForkRequest, type AgentForkResponse, type AgentForkSourceResponse, type AgentForksResponse, type AgentGroupCreateRequest, type AgentGroupCreateResponse, type AgentGroupDetail, type AgentGroupDetailQuery, type AgentGroupForkItem, type AgentGroupForkRequest, type AgentGroupForkResponse, type AgentGroupForkSourceResponse, type AgentGroupForksResponse, type AgentGroupItem, type AgentGroupListQuery, type AgentGroupListResponse, type AgentGroupModifyRequest, type AgentGroupModifyResponse, type AgentGroupStatus, type AgentGroupStatusChangeResponse, type AgentGroupVersionCreateRequest, type AgentGroupVersionCreateResponse, type AgentInstallCountRequest, type AgentInstallCountResponse, type AgentInterface, type AgentItemDetail, type AgentListQuery, type AgentListResponse, type AgentModifyRequest, type AgentModifyResponse, type AgentProfileEntity, type AgentProfileResponse, type AgentSecurityRequirement, type AgentSecurityScheme, type AgentSkill, type AgentStatus, type AgentStatusChangeResponse, type AgentUploadRequest, type AgentUploadResponse, type AgentUploadVersion, type AgentVersionCreateRequest, type AgentVersionCreateResponse, type AgentVersionLocalization, type AgentVersionModifyRequest, type AgentVersionModifyResponse, type AuthorizationCodeTokenRequest, type AuthorizeParams, type AuthorizeResponse, type CallSkillToolResponse, type CheckFavoriteQuery, type CheckFavoriteResponse, type CheckFollowQuery, type CheckFollowResponse, type CheckLikeQuery, type CheckLikeResponse, type CimdClientMetadata, type ClientRegistrationError, type ClientRegistrationRequest, type ClientRegistrationResponse, type CodeInterpreterToolName, type CodeInterpreterToolParams, type ConnectProvider, type ConnectProviderDetail, type ConnectProviderScopes, type ConnectionHealth, type ConnectionStats, type CreateFileCredRequest, type CreateKVCredRequest, type CreateMemberAgent, type CreateOAuthCredRequest, type CredWithPlaintext, type DeleteCredResponse, type DiscoveryDocument, type EditLocalFileParams, type ExecuteCodeParams, type ExportFileParams, type FavoriteListResponse, type FavoriteQuery, type FavoriteRequest, type FeedbackClientInfo, type FollowListItem, type FollowListResponse, type FollowRequest, type GetAllConnectionsHealthResponse, type GetAuthorizeUrlParams, type GetCommandOutputParams, type GetConnectProviderResponse, type GetConnectionHealthResponse, type GetConnectionStatsResponse, type GetConnectionStatusResponse, type GetCredOptions, type GetSkillStatusResponse, type GetSkillToolResponse, type GlobLocalFilesParams, type GrepContentParams, type InteractionTargetType, type KillCommandParams, type LikeListResponse, type LikeQuery, type LikeRequest, type ListConnectProvidersResponse, type ListConnectionsResponse, type ListCredsResponse, type ListLocalFilesParams, type ListSkillProvidersResponse, type ListSkillToolsResponse, MarketAPIError, MarketAdmin, type MarketReportGitHubSkillParams, type MarketReportGitHubSkillResponse, type MarketReportSkillInstallParams, type MarketReportSkillInstallResponse, MarketSDK, type MarketSDKOptions, type MarketSkillAuthor, type MarketSkillCategory, type MarketSkillCategoryQuery, type MarketSkillCollectionDetail, type MarketSkillCollectionDetailQuery, type MarketSkillCollectionItemSort, type MarketSkillCollectionListItem, type MarketSkillCollectionListQuery, type MarketSkillCollectionListResponse, type MarketSkillDetail, type MarketSkillDetailQuery, type MarketSkillGitHubMeta, type MarketSkillListItem, type MarketSkillListQuery, type MarketSkillListResponse, type MarketSkillManifest, type MarketSkillResource, type MarketSkillVersionSummary, type MarketSkillVersionsResponse, type MemberAgent, type MoveLocalFilesParams, type MoveOperation, type OAuthConnection, type OAuthTokenResponse, type OrganizationInfoQuery, type OrganizationInfoResponse, type OrganizationProfile, type OwnAgentGroupListQuery, type OwnAgentListQuery, type PaginationQuery, type PluginCommentAuthor, type PluginCommentCreateItem, type PluginCommentCreateResponse, type PluginCommentDeleteResponse, type PluginCommentItem, type PluginCommentListQuery, type PluginCommentListResponse, type PluginCommentRating, type PluginCommentReactionResponse, type PluginI18nImportParams, type PluginI18nImportResponse, type PluginItem, type PluginLatestOwnComment, type PluginListResponse, type PluginLocalization, type PluginQueryParams, type PluginRatingDistribution, type PluginUpdateParams, type PluginVersionCreateParams, type PluginVersionUpdateParams, type ProgrammingLanguage, type ReadLocalFileParams, type RefreshConnectionResponse, type RefreshTokenRequest, type RegisterUserRequest, type RegisterUserResponse, type RegisteredUserProfile, type RenameLocalFileParams, type ReviewStatus, ReviewStatusEnumSchema, type RevokeConnectionResponse, type RunBuildInToolsError, type RunBuildInToolsRequest, type RunBuildInToolsResponse, type RunBuildInToolsSuccessData, type RunCommandParams, SDK_USER_AGENT, SDK_VERSION, type SearchLocalFilesParams, type SharedTokenState, type SkillCallParams, type SkillCommentAuthor, type SkillCommentCreateItem, type SkillCommentCreateResponse, type SkillCommentDeleteResponse, type SkillCommentItem, type SkillCommentListItem, type SkillCommentListQuery, type SkillCommentListResponse, type SkillCommentRating, type SkillErrorResponse, type SkillLatestOwnComment, type SkillProviderInfo, type SkillProviderStatus, type SkillRatingDistribution, type SkillTool, type SkillToolsSource, StatusEnumSchema, type SubmitFeedbackRequest, type SubmitFeedbackResponse, type SuccessResponse, type ToggleLikeResponse, type TrustedClientPayload, type UnclaimedPluginItem, type UpdateAgentProfileRequest, type UpdateAgentProfileResponse, type UpdateCredRequest, type UpdateMemberAgent, type UpdateUserInfoRequest, type UpdateUserInfoResponse, type UserAgentGroupItem, type UserAgentItem, type UserInfoQuery, type UserInfoResponse, type UserPluginItem, type UserProfile, type UserSkillItem, VisibilityEnumSchema, type WriteLocalFileParams, buildTrustedClientPayload, createTrustedClientToken, generateNonce };