@nangohq/types 0.64.0 → 0.64.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.
@@ -11,7 +11,7 @@ import type { DeleteEnvironment, PatchEnvironment, PostEnvironment } from './env
11
11
  import type { PatchWebhook } from './environment/api/webhook.js';
12
12
  import type { PostEnvironmentVariables } from './environment/variable/api.js';
13
13
  import type { PatchFlowDisable, PatchFlowEnable, PatchFlowFrequency, PostPreBuiltDeploy, PutUpgradePreBuiltFlow } from './flow/http.api.js';
14
- import type { DeleteIntegration, DeletePublicIntegration, GetIntegration, GetIntegrationFlows, GetPublicIntegration, GetPublicListIntegrations, GetPublicListIntegrationsLegacy, PatchIntegration, PatchPublicIntegration, PostIntegration, PostPublicIntegration } from './integration/api.js';
14
+ import type { DeleteIntegration, DeletePublicIntegration, GetIntegration, GetIntegrationFlows, GetPublicIntegration, GetPublicListIntegrations, PatchIntegration, PatchPublicIntegration, PostIntegration, PostPublicIntegration } from './integration/api.js';
15
15
  import type { DeleteInvite, GetInvite, PostInvite } from './invitations/api.js';
16
16
  import type { GetOperation, PostInsights, SearchFilters, SearchMessages, SearchOperations } from './logs/api.js';
17
17
  import type { GetMeta } from './meta/api.js';
@@ -24,7 +24,7 @@ import type { PostPublicTrigger, PutPublicSyncConnectionFrequency } from './sync
24
24
  import type { DeleteTeamUser, GetTeam, PutTeam } from './team/api.js';
25
25
  import type { GetUser, PatchUser } from './user/api.js';
26
26
  import type { PostPublicWebhook } from './webhooks/http.api.js';
27
- export type PublicApiEndpoints = SetMetadata | UpdateMetadata | PostDeploy | PostDeployConfirmation | PostPublicTrigger | PostPublicTbaAuthorization | PostPublicJwtAuthorization | PostPublicUnauthenticatedAuthorization | PostPublicApiKeyAuthorization | PostPublicBasicAuthorization | PostPublicAppStoreAuthorization | GetPublicProviders | GetPublicProvider | GetPublicListIntegrationsLegacy | GetPublicListIntegrations | GetPublicIntegration | DeletePublicIntegration | PostConnectSessions | PostPublicConnectSessionsReconnect | GetPublicConnections | GetPublicConnection | GetConnectSession | DeleteConnectSession | PostDeployInternal | PostPublicBillAuthorization | DeletePublicConnection | PostPublicSignatureAuthorization | PostPublicTwoStepAuthorization | PostPublicWebhook | GetPublicRecords | GetPublicScriptsConfig | PostPublicConnectTelemetry | PutPublicSyncConnectionFrequency | PostPublicIntegration | PatchPublicIntegration | GetAsyncActionResult | PostPublicOauthOutboundAuthorization;
27
+ export type PublicApiEndpoints = SetMetadata | UpdateMetadata | PostDeploy | PostDeployConfirmation | PostPublicTrigger | PostPublicTbaAuthorization | PostPublicJwtAuthorization | PostPublicUnauthenticatedAuthorization | PostPublicApiKeyAuthorization | PostPublicBasicAuthorization | PostPublicAppStoreAuthorization | GetPublicProviders | GetPublicProvider | GetPublicListIntegrations | GetPublicIntegration | DeletePublicIntegration | PostConnectSessions | PostPublicConnectSessionsReconnect | GetPublicConnections | GetPublicConnection | GetConnectSession | DeleteConnectSession | PostDeployInternal | PostPublicBillAuthorization | DeletePublicConnection | PostPublicSignatureAuthorization | PostPublicTwoStepAuthorization | PostPublicWebhook | GetPublicRecords | GetPublicScriptsConfig | PostPublicConnectTelemetry | PutPublicSyncConnectionFrequency | PostPublicIntegration | PatchPublicIntegration | GetAsyncActionResult | PostPublicOauthOutboundAuthorization;
28
28
  export type PrivateApiEndpoints = PostSignup | PostSignin | PostLogout | GetTeam | PutTeam | PostPlanExtendTrial | GetUser | PatchUser | PostInvite | DeleteInvite | DeleteTeamUser | PostInsights | PostForgotPassword | PutResetPassword | SearchOperations | GetOperation | SearchMessages | SearchFilters | PatchOnboarding | PostInternalConnectSessions | GetIntegrationFlows | DeleteIntegration | PatchIntegration | GetIntegration | PostIntegration | GetConnections | GetConnectionsCount | GetConnection | GetInvite | GetMeta | GetEmailByExpiredToken | GetEmailByUuid | GetManagedCallback | PatchFlowDisable | PatchFlowEnable | PatchFlowFrequency | PutUpgradePreBuiltFlow | PostConnectionRefresh | PostManagedSignup | PostPreBuiltDeploy | PostEnvironment | PatchEnvironment | DeleteEnvironment | PatchWebhook | PostEnvironmentVariables | PostImpersonate;
29
29
  export type APIEndpoints = PrivateApiEndpoints | PublicApiEndpoints;
30
30
  /**
@@ -26,7 +26,7 @@ export interface BillingClient {
26
26
  * format: dollar.cent = 0.00
27
27
  */
28
28
  amount: string;
29
- }) => Promise<Result<void>>;
29
+ }) => Promise<Result<BillingSubscription>>;
30
30
  cancelPendingChanges: (opts: {
31
31
  pendingChangeId: string;
32
32
  }) => Promise<Result<void>>;
package/dist/index.d.ts CHANGED
@@ -23,6 +23,8 @@ export type * from './team/api.js';
23
23
  export type * from './team/db.js';
24
24
  export type * from './billing/types.js';
25
25
  export type * from './billing/http.api.js';
26
+ export type * from './usage/dto.js';
27
+ export type * from './usage/db.js';
26
28
  export type * from './providers/api.js';
27
29
  export type * from './proxy/api.js';
28
30
  export type * from './result.js';
@@ -21,13 +21,6 @@ export interface ApiPublicIntegrationInclude {
21
21
  app_link: string | null;
22
22
  } | null;
23
23
  }
24
- export type GetPublicListIntegrationsLegacy = Endpoint<{
25
- Method: 'GET';
26
- Path: '/config';
27
- Success: {
28
- configs: ApiPublicIntegration[];
29
- };
30
- }>;
31
24
  export type GetPublicListIntegrations = Endpoint<{
32
25
  Method: 'GET';
33
26
  Path: '/integrations';
@@ -91,16 +84,6 @@ export type DeletePublicIntegration = Endpoint<{
91
84
  success: true;
92
85
  };
93
86
  }>;
94
- export type DeletePublicIntegrationDeprecated = Endpoint<{
95
- Method: 'DELETE';
96
- Path: '/config/:providerConfigKey';
97
- Params: {
98
- providerConfigKey: string;
99
- };
100
- Success: {
101
- success: true;
102
- };
103
- }>;
104
87
  export type ApiIntegration = Omit<Merge<IntegrationConfig, ApiTimestamps>, 'oauth_client_secret_iv' | 'oauth_client_secret_tag'>;
105
88
  export type ApiIntegrationList = ApiIntegration & {
106
89
  meta: {
@@ -0,0 +1,9 @@
1
+ export interface DBAccountUsage {
2
+ id: number;
3
+ account_id: number;
4
+ month: Date;
5
+ actions: number;
6
+ active_records: number;
7
+ created_at: string;
8
+ updated_at: string;
9
+ }
@@ -0,0 +1,11 @@
1
+ import type { DBAccountUsage } from './db.js';
2
+ export interface CreateAccountUsageDto {
3
+ accountId: DBAccountUsage['account_id'];
4
+ month: DBAccountUsage['month'];
5
+ actions?: DBAccountUsage['actions'];
6
+ activeRecords?: DBAccountUsage['active_records'];
7
+ }
8
+ export interface UpdateAccountUsageDto {
9
+ actions?: DBAccountUsage['actions'];
10
+ activeRecords?: DBAccountUsage['active_records'];
11
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nangohq/types",
3
- "version": "0.64.0",
3
+ "version": "0.64.2",
4
4
  "description": "Types used in Nango applications",
5
5
  "type": "module",
6
6
  "typings": "dist/index.d.ts",
@@ -12,7 +12,7 @@
12
12
  "directory": "packages/utils"
13
13
  },
14
14
  "dependencies": {
15
- "axios": "1.9.0",
15
+ "axios": "1.10.0",
16
16
  "json-schema": "0.4.0",
17
17
  "type-fest": "4.41.0"
18
18
  },