@xberg-io/sdk 0.8.1 → 0.9.0

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.js CHANGED
@@ -359,7 +359,7 @@ const SUCCESS_JOB_STATUSES = ["completed", "partial_success"];
359
359
  * and defaults to `baseUrl`. The backend methods use that origin and an optional
360
360
  * separate `controlPlaneToken`; existing Pro methods retain their data-plane routing.
361
361
  */
362
- const USER_AGENT = `xberg-io-sdk-typescript/0.8.1`;
362
+ const USER_AGENT = `xberg-io-sdk-typescript/0.9.0`;
363
363
  const DEFAULT_TIMEOUT_MS = 3e4;
364
364
  const DEFAULT_POLL_INTERVAL_MS = 1e3;
365
365
  const DEFAULT_WAIT_TIMEOUT_MS = 3e5;
@@ -602,6 +602,14 @@ var XbergClient = class {
602
602
  async backendFetchIntegrationDocument(projectId, integrationId, documentId) {
603
603
  return await this.requestBytes("GET", `/v1/projects/${encodePathSegment(projectId)}/integrations/${encodePathSegment(integrationId)}/documents/${encodePathSegment(documentId)}`, { controlPlane: true });
604
604
  }
605
+ /** Enterprise backend `GET /v1/projects/{id}/integrations/{iid}/sync`. */
606
+ async backendGetIntegrationSync(projectId, integrationId) {
607
+ return await this.backendRequest("GET", `/v1/projects/${encodePathSegment(projectId)}/integrations/${encodePathSegment(integrationId)}/sync`);
608
+ }
609
+ /** Enterprise backend `PUT /v1/projects/{id}/integrations/{iid}/sync`. */
610
+ async backendSetIntegrationSync(projectId, integrationId, body) {
611
+ return await this.backendRequest("PUT", `/v1/projects/${encodePathSegment(projectId)}/integrations/${encodePathSegment(integrationId)}/sync`, { json: body });
612
+ }
605
613
  /** Enterprise backend `GET /v1/projects/{id}/invitations`. */
606
614
  async listInvitations(projectId, params = {}) {
607
615
  return await this.backendRequest("GET", `/v1/projects/${encodePathSegment(projectId)}/invitations`, { params: {
@@ -636,6 +644,10 @@ var XbergClient = class {
636
644
  async updateMemberRole(projectId, userId, body) {
637
645
  return await this.backendRequest("PATCH", `/v1/projects/${encodePathSegment(projectId)}/members/${encodePathSegment(userId)}`, { json: body });
638
646
  }
647
+ /** Enterprise backend `PATCH /v1/projects/{id}/members/{user_id}/custom-role`. */
648
+ async assignProjectRole(projectId, userId, body) {
649
+ return await this.backendRequest("PATCH", `/v1/projects/${encodePathSegment(projectId)}/members/${encodePathSegment(userId)}/custom-role`, { json: body });
650
+ }
639
651
  /** Enterprise backend `GET /v1/projects/{id}/rag-config`. */
640
652
  async backendGetRagConfig(projectId) {
641
653
  return await this.backendRequest("GET", `/v1/projects/${encodePathSegment(projectId)}/rag-config`);
@@ -644,10 +656,81 @@ var XbergClient = class {
644
656
  async backendSetRagConfig(projectId, body) {
645
657
  return await this.backendRequest("PUT", `/v1/projects/${encodePathSegment(projectId)}/rag-config`, { json: body });
646
658
  }
659
+ /** Enterprise backend `GET /v1/projects/{id}/roles`. */
660
+ async listProjectRoles(projectId, params = {}) {
661
+ return await this.backendRequest("GET", `/v1/projects/${encodePathSegment(projectId)}/roles`, { params: {
662
+ limit: params.limit,
663
+ offset: params.offset
664
+ } });
665
+ }
666
+ /** Enterprise backend `POST /v1/projects/{id}/roles`. */
667
+ async createProjectRole(projectId, body) {
668
+ return await this.backendRequest("POST", `/v1/projects/${encodePathSegment(projectId)}/roles`, { json: body });
669
+ }
670
+ /** Enterprise backend `GET /v1/projects/{id}/roles/{role_id}`. */
671
+ async getProjectRole(projectId, roleId) {
672
+ return await this.backendRequest("GET", `/v1/projects/${encodePathSegment(projectId)}/roles/${encodePathSegment(roleId)}`);
673
+ }
674
+ /** Enterprise backend `PATCH /v1/projects/{id}/roles/{role_id}`. */
675
+ async updateProjectRole(projectId, roleId, body) {
676
+ return await this.backendRequest("PATCH", `/v1/projects/${encodePathSegment(projectId)}/roles/${encodePathSegment(roleId)}`, { json: body });
677
+ }
678
+ /** Enterprise backend `DELETE /v1/projects/{id}/roles/{role_id}`. */
679
+ async deleteProjectRole(projectId, roleId) {
680
+ return await this.backendRequest("DELETE", `/v1/projects/${encodePathSegment(projectId)}/roles/${encodePathSegment(roleId)}`);
681
+ }
682
+ /** Enterprise backend `GET /v1/projects/{project_id}/saml/domains`. */
683
+ async listSamlDomains(projectId) {
684
+ return await this.backendRequest("GET", `/v1/projects/${encodePathSegment(projectId)}/saml/domains`);
685
+ }
686
+ /** Enterprise backend `POST /v1/projects/{project_id}/saml/domains`. */
687
+ async createSamlDomain(projectId, body) {
688
+ return await this.backendRequest("POST", `/v1/projects/${encodePathSegment(projectId)}/saml/domains`, { json: body });
689
+ }
690
+ /** Enterprise backend `POST /v1/projects/{project_id}/saml/domains/{domain}/verify`. */
691
+ async verifySamlDomain(projectId, domain) {
692
+ return await this.backendRequest("POST", `/v1/projects/${encodePathSegment(projectId)}/saml/domains/${encodePathSegment(domain)}/verify`);
693
+ }
694
+ /** Enterprise backend `GET /v1/projects/{project_id}/saml/providers`. */
695
+ async listSamlProviders(projectId) {
696
+ return await this.backendRequest("GET", `/v1/projects/${encodePathSegment(projectId)}/saml/providers`);
697
+ }
698
+ /** Enterprise backend `POST /v1/projects/{project_id}/saml/providers`. */
699
+ async createSamlProvider(projectId, body) {
700
+ return await this.backendRequest("POST", `/v1/projects/${encodePathSegment(projectId)}/saml/providers`, { json: body });
701
+ }
702
+ /** Enterprise backend `PUT /v1/projects/{project_id}/saml/providers/{provider_id}`. */
703
+ async updateSamlProvider(projectId, providerId, body) {
704
+ return await this.backendRequest("PUT", `/v1/projects/${encodePathSegment(projectId)}/saml/providers/${encodePathSegment(providerId)}`, { json: body });
705
+ }
706
+ /** Enterprise backend `DELETE /v1/projects/{project_id}/saml/providers/{provider_id}`. */
707
+ async deleteSamlProvider(projectId, providerId) {
708
+ return await this.backendRequest("DELETE", `/v1/projects/${encodePathSegment(projectId)}/saml/providers/${encodePathSegment(providerId)}`);
709
+ }
647
710
  /** Enterprise backend `POST /v1/projects/{id}/sandbox/extract`. */
648
711
  async sandboxExtract(projectId, params) {
649
712
  return await this.backendRequest("POST", `/v1/projects/${encodePathSegment(projectId)}/sandbox/extract`, { body: sandboxForm(params) });
650
713
  }
714
+ /** Enterprise backend `GET /v1/projects/{id}/scim/connections`. */
715
+ async listScimConnections(projectId) {
716
+ return await this.backendRequest("GET", `/v1/projects/${encodePathSegment(projectId)}/scim/connections`);
717
+ }
718
+ /** Enterprise backend `POST /v1/projects/{id}/scim/connections`. */
719
+ async createScimConnection(projectId, body) {
720
+ return await this.backendRequest("POST", `/v1/projects/${encodePathSegment(projectId)}/scim/connections`, { json: body });
721
+ }
722
+ /** Enterprise backend `GET /v1/projects/{id}/scim/connections/{connection_id}/groups`. */
723
+ async listScimAdminGroups(projectId, connectionId) {
724
+ return await this.backendRequest("GET", `/v1/projects/${encodePathSegment(projectId)}/scim/connections/${encodePathSegment(connectionId)}/groups`);
725
+ }
726
+ /** Enterprise backend `PUT /v1/projects/{id}/scim/connections/{connection_id}/groups/{group_id}/roles`. */
727
+ async replaceScimGroupRoles(projectId, connectionId, groupId, body) {
728
+ return await this.backendRequest("PUT", `/v1/projects/${encodePathSegment(projectId)}/scim/connections/${encodePathSegment(connectionId)}/groups/${encodePathSegment(groupId)}/roles`, { json: body });
729
+ }
730
+ /** Enterprise backend `POST /v1/projects/{id}/scim/connections/{connection_id}/rotate`. */
731
+ async rotateScimConnectionSecret(projectId, connectionId) {
732
+ return await this.backendRequest("POST", `/v1/projects/${encodePathSegment(projectId)}/scim/connections/${encodePathSegment(connectionId)}/rotate`);
733
+ }
651
734
  /** Enterprise backend `GET /v1/projects/{id}/usage`. */
652
735
  async getUsage(projectId, params) {
653
736
  return await this.backendRequest("GET", `/v1/projects/${encodePathSegment(projectId)}/usage`, { params: {