@pontive/server 1.27.0 → 1.29.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.
@@ -733,9 +733,9 @@ export declare class Authn {
733
733
  */
734
734
  readonly connections: AuthnConnections;
735
735
  /**
736
- * The identity policy: which identifiers users have, and the email policy.
736
+ * The login ID policy: the rules for the email, phone and username users sign in with.
737
737
  */
738
- readonly identityPolicy: AuthnIdentityPolicy;
738
+ readonly loginIdPolicy: AuthnLoginIdPolicy;
739
739
  /**
740
740
  * Systems users are migrated from, lazily or by import.
741
741
  */
@@ -906,21 +906,21 @@ export declare class AuthnConnections {
906
906
  replace(appId: string, connectionSlug: string, body: T.CreateOAuthConnectionRequest, options?: RequestOptions): APIPromise<T.OAuthConnection>;
907
907
  }
908
908
  /**
909
- * The identity policy: which identifiers users have, and the email policy.
909
+ * The login ID policy: the rules for the email, phone and username users sign in with.
910
910
  */
911
- export declare class AuthnIdentityPolicy {
911
+ export declare class AuthnLoginIdPolicy {
912
912
  protected readonly core: Core;
913
913
  /** @internal */
914
914
  constructor(core: Core);
915
915
  /**
916
- * Get identity policy.
916
+ * Get login ID policy.
917
917
  *
918
- * Get the instance's identity policy (email, phone, and username rules). If none has been configured,
918
+ * Get the instance's login ID policy (email, phone, and username rules). If none has been configured,
919
919
  * the default policy is returned.
920
920
  *
921
- * `GET /v1/authn/identity-policy` (GetIdentityPolicy)
921
+ * `GET /v1/authn/login-id-policy` (GetLoginIDPolicy)
922
922
  */
923
- get(options?: RequestOptions): APIPromise<T.IdentityPolicy>;
923
+ get(options?: RequestOptions): APIPromise<T.LoginIDPolicy>;
924
924
  /**
925
925
  * Preview email rules.
926
926
  *
@@ -928,17 +928,17 @@ export declare class AuthnIdentityPolicy {
928
928
  * (email.enforce_at_signin), with a count per rule. Changes nothing. Ask before turning enforcement
929
929
  * on, or tightening a rule while it is on, to see who would be locked out.
930
930
  *
931
- * `POST /v1/authn/identity-policy/email/preview` (PreviewEmailPolicy)
931
+ * `POST /v1/authn/login-id-policy/email/preview` (PreviewEmailPolicy)
932
932
  */
933
933
  previewEmailPolicy(body: T.PreviewEmailPolicyRequest, options?: RequestOptions): APIPromise<T.EmailPolicyPreview>;
934
934
  /**
935
- * Update identity policy.
935
+ * Update login ID policy.
936
936
  *
937
- * Patch the instance's identity policy. Omitted sub-policies and fields are left unchanged.
937
+ * Patch the instance's login ID policy. Omitted sub-policies and fields are left unchanged.
938
938
  *
939
- * `PATCH /v1/authn/identity-policy` (UpdateIdentityPolicy)
939
+ * `PATCH /v1/authn/login-id-policy` (UpdateLoginIDPolicy)
940
940
  */
941
- update(body: T.UpdateIdentityPolicyRequest, params?: T.UpdateIdentityPolicyParams, options?: RequestOptions): APIPromise<T.IdentityPolicy>;
941
+ update(body: T.UpdateLoginIDPolicyRequest, params?: T.UpdateLoginIDPolicyParams, options?: RequestOptions): APIPromise<T.LoginIDPolicy>;
942
942
  }
943
943
  /**
944
944
  * Systems users are migrated from, lazily or by import.
@@ -733,9 +733,9 @@ export declare class Authn {
733
733
  */
734
734
  readonly connections: AuthnConnections;
735
735
  /**
736
- * The identity policy: which identifiers users have, and the email policy.
736
+ * The login ID policy: the rules for the email, phone and username users sign in with.
737
737
  */
738
- readonly identityPolicy: AuthnIdentityPolicy;
738
+ readonly loginIdPolicy: AuthnLoginIdPolicy;
739
739
  /**
740
740
  * Systems users are migrated from, lazily or by import.
741
741
  */
@@ -906,21 +906,21 @@ export declare class AuthnConnections {
906
906
  replace(appId: string, connectionSlug: string, body: T.CreateOAuthConnectionRequest, options?: RequestOptions): APIPromise<T.OAuthConnection>;
907
907
  }
908
908
  /**
909
- * The identity policy: which identifiers users have, and the email policy.
909
+ * The login ID policy: the rules for the email, phone and username users sign in with.
910
910
  */
911
- export declare class AuthnIdentityPolicy {
911
+ export declare class AuthnLoginIdPolicy {
912
912
  protected readonly core: Core;
913
913
  /** @internal */
914
914
  constructor(core: Core);
915
915
  /**
916
- * Get identity policy.
916
+ * Get login ID policy.
917
917
  *
918
- * Get the instance's identity policy (email, phone, and username rules). If none has been configured,
918
+ * Get the instance's login ID policy (email, phone, and username rules). If none has been configured,
919
919
  * the default policy is returned.
920
920
  *
921
- * `GET /v1/authn/identity-policy` (GetIdentityPolicy)
921
+ * `GET /v1/authn/login-id-policy` (GetLoginIDPolicy)
922
922
  */
923
- get(options?: RequestOptions): APIPromise<T.IdentityPolicy>;
923
+ get(options?: RequestOptions): APIPromise<T.LoginIDPolicy>;
924
924
  /**
925
925
  * Preview email rules.
926
926
  *
@@ -928,17 +928,17 @@ export declare class AuthnIdentityPolicy {
928
928
  * (email.enforce_at_signin), with a count per rule. Changes nothing. Ask before turning enforcement
929
929
  * on, or tightening a rule while it is on, to see who would be locked out.
930
930
  *
931
- * `POST /v1/authn/identity-policy/email/preview` (PreviewEmailPolicy)
931
+ * `POST /v1/authn/login-id-policy/email/preview` (PreviewEmailPolicy)
932
932
  */
933
933
  previewEmailPolicy(body: T.PreviewEmailPolicyRequest, options?: RequestOptions): APIPromise<T.EmailPolicyPreview>;
934
934
  /**
935
- * Update identity policy.
935
+ * Update login ID policy.
936
936
  *
937
- * Patch the instance's identity policy. Omitted sub-policies and fields are left unchanged.
937
+ * Patch the instance's login ID policy. Omitted sub-policies and fields are left unchanged.
938
938
  *
939
- * `PATCH /v1/authn/identity-policy` (UpdateIdentityPolicy)
939
+ * `PATCH /v1/authn/login-id-policy` (UpdateLoginIDPolicy)
940
940
  */
941
- update(body: T.UpdateIdentityPolicyRequest, params?: T.UpdateIdentityPolicyParams, options?: RequestOptions): APIPromise<T.IdentityPolicy>;
941
+ update(body: T.UpdateLoginIDPolicyRequest, params?: T.UpdateLoginIDPolicyParams, options?: RequestOptions): APIPromise<T.LoginIDPolicy>;
942
942
  }
943
943
  /**
944
944
  * Systems users are migrated from, lazily or by import.
@@ -4776,14 +4776,6 @@ export interface IdentityConnection {
4776
4776
  connection_slug?: string;
4777
4777
  connection_type?: "google" | "github" | "apple" | "oidc" | "microsoft" | "entra";
4778
4778
  }
4779
- export interface IdentityPolicy {
4780
- created_at?: string;
4781
- email?: EmailPolicy;
4782
- object?: string;
4783
- phone?: PhonePolicy;
4784
- updated_at?: string;
4785
- username?: UsernamePolicy;
4786
- }
4787
4779
  export interface ImportAuthflowsRequest {
4788
4780
  /**
4789
4781
  * DiscardUnpublished lets the import overwrite a draft with unpublished changes, which is otherwise a
@@ -6146,6 +6138,14 @@ export interface LocalizationSettings {
6146
6138
  updated_at?: string;
6147
6139
  updated_by?: string;
6148
6140
  }
6141
+ export interface LoginIDPolicy {
6142
+ created_at?: string;
6143
+ email?: EmailPolicy;
6144
+ object?: string;
6145
+ phone?: PhonePolicy;
6146
+ updated_at?: string;
6147
+ username?: UsernamePolicy;
6148
+ }
6149
6149
  export interface MCPTool {
6150
6150
  annotations?: MCPToolAnnotations;
6151
6151
  description?: string;
@@ -10949,11 +10949,6 @@ export interface UpdateGroupRequest {
10949
10949
  metadata?: Record<string, string>;
10950
10950
  name?: string;
10951
10951
  }
10952
- export interface UpdateIdentityPolicyRequest {
10953
- email?: EmailPolicyUpdate;
10954
- phone?: PhonePolicyUpdate;
10955
- username?: UsernamePolicyUpdate;
10956
- }
10957
10952
  export interface UpdateInstallationRequest {
10958
10953
  /**
10959
10954
  * DelegatedOnly, when present, lends the roles only to the agent's side of a delegation (true), or to
@@ -10980,6 +10975,11 @@ export interface UpdateLocalizationSettingsRequest {
10980
10975
  */
10981
10976
  enabled_locales?: string[];
10982
10977
  }
10978
+ export interface UpdateLoginIDPolicyRequest {
10979
+ email?: EmailPolicyUpdate;
10980
+ phone?: PhonePolicyUpdate;
10981
+ username?: UsernamePolicyUpdate;
10982
+ }
10983
10983
  export interface UpdateMemberRolesRequest {
10984
10984
  roles?: string[];
10985
10985
  }
@@ -12057,9 +12057,9 @@ export interface ListAuthConnectionTypesParams {
12057
12057
  limit?: number;
12058
12058
  }
12059
12059
  /**
12060
- * The parameters of `UpdateIdentityPolicy`.
12060
+ * The parameters of `UpdateLoginIDPolicy`.
12061
12061
  */
12062
- export interface UpdateIdentityPolicyParams {
12062
+ export interface UpdateLoginIDPolicyParams {
12063
12063
  /**
12064
12064
  * The ETag the document was read with: a stale one is refused 412 precondition_failed (D42) Sent as
12065
12065
  * the `If-Match` header.
@@ -4776,14 +4776,6 @@ export interface IdentityConnection {
4776
4776
  connection_slug?: string;
4777
4777
  connection_type?: "google" | "github" | "apple" | "oidc" | "microsoft" | "entra";
4778
4778
  }
4779
- export interface IdentityPolicy {
4780
- created_at?: string;
4781
- email?: EmailPolicy;
4782
- object?: string;
4783
- phone?: PhonePolicy;
4784
- updated_at?: string;
4785
- username?: UsernamePolicy;
4786
- }
4787
4779
  export interface ImportAuthflowsRequest {
4788
4780
  /**
4789
4781
  * DiscardUnpublished lets the import overwrite a draft with unpublished changes, which is otherwise a
@@ -6146,6 +6138,14 @@ export interface LocalizationSettings {
6146
6138
  updated_at?: string;
6147
6139
  updated_by?: string;
6148
6140
  }
6141
+ export interface LoginIDPolicy {
6142
+ created_at?: string;
6143
+ email?: EmailPolicy;
6144
+ object?: string;
6145
+ phone?: PhonePolicy;
6146
+ updated_at?: string;
6147
+ username?: UsernamePolicy;
6148
+ }
6149
6149
  export interface MCPTool {
6150
6150
  annotations?: MCPToolAnnotations;
6151
6151
  description?: string;
@@ -10949,11 +10949,6 @@ export interface UpdateGroupRequest {
10949
10949
  metadata?: Record<string, string>;
10950
10950
  name?: string;
10951
10951
  }
10952
- export interface UpdateIdentityPolicyRequest {
10953
- email?: EmailPolicyUpdate;
10954
- phone?: PhonePolicyUpdate;
10955
- username?: UsernamePolicyUpdate;
10956
- }
10957
10952
  export interface UpdateInstallationRequest {
10958
10953
  /**
10959
10954
  * DelegatedOnly, when present, lends the roles only to the agent's side of a delegation (true), or to
@@ -10980,6 +10975,11 @@ export interface UpdateLocalizationSettingsRequest {
10980
10975
  */
10981
10976
  enabled_locales?: string[];
10982
10977
  }
10978
+ export interface UpdateLoginIDPolicyRequest {
10979
+ email?: EmailPolicyUpdate;
10980
+ phone?: PhonePolicyUpdate;
10981
+ username?: UsernamePolicyUpdate;
10982
+ }
10983
10983
  export interface UpdateMemberRolesRequest {
10984
10984
  roles?: string[];
10985
10985
  }
@@ -12057,9 +12057,9 @@ export interface ListAuthConnectionTypesParams {
12057
12057
  limit?: number;
12058
12058
  }
12059
12059
  /**
12060
- * The parameters of `UpdateIdentityPolicy`.
12060
+ * The parameters of `UpdateLoginIDPolicy`.
12061
12061
  */
12062
- export interface UpdateIdentityPolicyParams {
12062
+ export interface UpdateLoginIDPolicyParams {
12063
12063
  /**
12064
12064
  * The ETag the document was read with: a stale one is refused 412 precondition_failed (D42) Sent as
12065
12065
  * the `If-Match` header.
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./client-DdtDcUK9.cjs");exports.APIPromise=r.APIPromise;exports.AuthenticationError=r.AuthenticationError;exports.BadRequestError=r.BadRequestError;exports.ConflictError=r.ConflictError;exports.InternalServerError=r.InternalServerError;exports.NotFoundError=r.NotFoundError;exports.Page=r.Page;exports.PagePromise=r.PagePromise;exports.PermissionDeniedError=r.PermissionDeniedError;exports.Pontive=r.Pontive;exports.PontiveAPIError=r.PontiveAPIError;exports.PontiveConnectionError=r.PontiveConnectionError;exports.PreconditionFailedError=r.PreconditionFailedError;exports.RateLimitError=r.RateLimitError;exports.UnprocessableEntityError=r.UnprocessableEntityError;exports.secretKeyRegion=r.secretKeyRegion;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./client-BfPi8CfF.cjs");exports.APIPromise=r.APIPromise;exports.AuthenticationError=r.AuthenticationError;exports.BadRequestError=r.BadRequestError;exports.ConflictError=r.ConflictError;exports.InternalServerError=r.InternalServerError;exports.NotFoundError=r.NotFoundError;exports.Page=r.Page;exports.PagePromise=r.PagePromise;exports.PermissionDeniedError=r.PermissionDeniedError;exports.Pontive=r.Pontive;exports.PontiveAPIError=r.PontiveAPIError;exports.PontiveConnectionError=r.PontiveConnectionError;exports.PreconditionFailedError=r.PreconditionFailedError;exports.RateLimitError=r.RateLimitError;exports.UnprocessableEntityError=r.UnprocessableEntityError;exports.secretKeyRegion=r.secretKeyRegion;
2
2
  //# sourceMappingURL=management.cjs.map
@@ -1,4 +1,4 @@
1
- import { A as e, a, B as s, C as i, I as n, N as t, P as E, b as P, c, d, e as m, f as g, g as l, R as v, U as A, s as I } from "./client-B3NStbMW.js";
1
+ import { A as e, a, B as s, C as i, I as n, N as t, P as E, b as P, c, d, e as m, f as g, g as l, R as v, U as A, s as I } from "./client-B5zZyWMn.js";
2
2
  export {
3
3
  e as APIPromise,
4
4
  a as AuthenticationError,
@@ -0,0 +1,49 @@
1
+ import { Env } from '../env.cjs';
2
+ import { PontiveNamespaces } from './generated/namespaces.cjs';
3
+ /** The platform API's host, unless overridden. */
4
+ export declare const PLATFORM_URL = "https://api.pontive.com";
5
+ /**
6
+ * How a {@link PontivePlatform} client authenticates and where it sends its
7
+ * calls. Every field is optional: one left out falls back to its environment
8
+ * variable, so `new PontivePlatform()` works with `PONTIVE_WORKSPACE_KEY` or
9
+ * `PONTIVE_ACCESS_TOKEN` set.
10
+ */
11
+ export interface PontivePlatformOptions {
12
+ /** A workspace secret key, `pontive_wsk_…`: CI, Terraform, provisioning. Default: `PONTIVE_WORKSPACE_KEY`. */
13
+ workspaceKey?: string;
14
+ /**
15
+ * A personal access token, `pontive_pat_…`, for your own scripts, or any
16
+ * bearer token (a function returning one) the caller manages. Default:
17
+ * `PONTIVE_ACCESS_TOKEN`.
18
+ */
19
+ token?: string | (() => string | Promise<string>);
20
+ /** Overrides the platform API's base, `https://api.pontive.com`. Default: `PONTIVE_PLATFORM_URL`. */
21
+ platformUrl?: string;
22
+ /** How many times a failed call is retried: a 429, a 5xx or a network error, when it is safe to repeat. Default 2. */
23
+ maxRetries?: number;
24
+ /** Milliseconds each attempt may take. Default 60000. */
25
+ timeout?: number;
26
+ /** The `fetch` to send with. Default: the global one. */
27
+ fetch?: typeof fetch;
28
+ /** The environment to fall back to. Default: `process.env`. */
29
+ env?: Env;
30
+ }
31
+ /**
32
+ * A client for Pontive's platform API, `api.pontive.com`: the workspace, its
33
+ * projects, instances, members, domains and webhooks, and the instances'
34
+ * secret keys (pontive-spec 48). Namespaces follow the API:
35
+ * `platform.projects`, `platform.instances`, `platform.workspaces.webhooks`, …
36
+ *
37
+ * ```ts
38
+ * const platform = new PontivePlatform({ workspaceKey: process.env.PONTIVE_WORKSPACE_KEY });
39
+ * const instance = await platform.instances.create({ project_id: "proj_…", environment: "non_production", name: "preview-42" });
40
+ * const key = await platform.instances.createSecretKey(instance.id!, { name: "ci", role: "developer" });
41
+ * ```
42
+ *
43
+ * A workspace key or personal access token reaches one workspace, with its
44
+ * role there. Server-side only: the constructor refuses a credential in a
45
+ * browser.
46
+ */
47
+ export declare class PontivePlatform extends PontiveNamespaces {
48
+ constructor(options?: PontivePlatformOptions);
49
+ }
@@ -0,0 +1,49 @@
1
+ import { Env } from '../env.js';
2
+ import { PontiveNamespaces } from './generated/namespaces.js';
3
+ /** The platform API's host, unless overridden. */
4
+ export declare const PLATFORM_URL = "https://api.pontive.com";
5
+ /**
6
+ * How a {@link PontivePlatform} client authenticates and where it sends its
7
+ * calls. Every field is optional: one left out falls back to its environment
8
+ * variable, so `new PontivePlatform()` works with `PONTIVE_WORKSPACE_KEY` or
9
+ * `PONTIVE_ACCESS_TOKEN` set.
10
+ */
11
+ export interface PontivePlatformOptions {
12
+ /** A workspace secret key, `pontive_wsk_…`: CI, Terraform, provisioning. Default: `PONTIVE_WORKSPACE_KEY`. */
13
+ workspaceKey?: string;
14
+ /**
15
+ * A personal access token, `pontive_pat_…`, for your own scripts, or any
16
+ * bearer token (a function returning one) the caller manages. Default:
17
+ * `PONTIVE_ACCESS_TOKEN`.
18
+ */
19
+ token?: string | (() => string | Promise<string>);
20
+ /** Overrides the platform API's base, `https://api.pontive.com`. Default: `PONTIVE_PLATFORM_URL`. */
21
+ platformUrl?: string;
22
+ /** How many times a failed call is retried: a 429, a 5xx or a network error, when it is safe to repeat. Default 2. */
23
+ maxRetries?: number;
24
+ /** Milliseconds each attempt may take. Default 60000. */
25
+ timeout?: number;
26
+ /** The `fetch` to send with. Default: the global one. */
27
+ fetch?: typeof fetch;
28
+ /** The environment to fall back to. Default: `process.env`. */
29
+ env?: Env;
30
+ }
31
+ /**
32
+ * A client for Pontive's platform API, `api.pontive.com`: the workspace, its
33
+ * projects, instances, members, domains and webhooks, and the instances'
34
+ * secret keys (pontive-spec 48). Namespaces follow the API:
35
+ * `platform.projects`, `platform.instances`, `platform.workspaces.webhooks`, …
36
+ *
37
+ * ```ts
38
+ * const platform = new PontivePlatform({ workspaceKey: process.env.PONTIVE_WORKSPACE_KEY });
39
+ * const instance = await platform.instances.create({ project_id: "proj_…", environment: "non_production", name: "preview-42" });
40
+ * const key = await platform.instances.createSecretKey(instance.id!, { name: "ci", role: "developer" });
41
+ * ```
42
+ *
43
+ * A workspace key or personal access token reaches one workspace, with its
44
+ * role there. Server-side only: the constructor refuses a credential in a
45
+ * browser.
46
+ */
47
+ export declare class PontivePlatform extends PontiveNamespaces {
48
+ constructor(options?: PontivePlatformOptions);
49
+ }
@@ -0,0 +1 @@
1
+ export * from '../management/core.cjs';
@@ -0,0 +1 @@
1
+ export * from '../management/core.js';