@pushwoosh/rpc-v2-http-api-data 0.2.224 → 0.2.226

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/data.js CHANGED
@@ -17069,6 +17069,30 @@ export const data = {
17069
17069
  "method": "delete",
17070
17070
  "path": "/api/integrations/configurations/google"
17071
17071
  },
17072
+ "GetOAuthIntegration": {
17073
+ "request": "pushwoosh.rpc_v2.integrations.GetOAuthIntegrationRequest",
17074
+ "response": "pushwoosh.rpc_v2.integrations.GetOAuthIntegrationResponse",
17075
+ "method": "get",
17076
+ "path": "/api/integrations/oauth/{provider}"
17077
+ },
17078
+ "GetOAuthAuthURL": {
17079
+ "request": "pushwoosh.rpc_v2.integrations.GetOAuthAuthURLRequest",
17080
+ "response": "pushwoosh.rpc_v2.integrations.GetOAuthAuthURLResponse",
17081
+ "method": "get",
17082
+ "path": "/api/integrations/oauth/{provider}/auth"
17083
+ },
17084
+ "SetOAuthCredentials": {
17085
+ "request": "pushwoosh.rpc_v2.integrations.SetOAuthCredentialsRequest",
17086
+ "response": "pushwoosh.rpc_v2.integrations.SetOAuthCredentialsResponse",
17087
+ "method": "put",
17088
+ "path": "/api/integrations/oauth/{provider}/credentials"
17089
+ },
17090
+ "DeleteOAuthIntegration": {
17091
+ "request": "pushwoosh.rpc_v2.integrations.DeleteOAuthIntegrationRequest",
17092
+ "response": "pushwoosh.rpc_v2.integrations.DeleteOAuthIntegrationResponse",
17093
+ "method": "delete",
17094
+ "path": "/api/integrations/oauth/{provider}"
17095
+ },
17072
17096
  "GetMetaAuthURL": {
17073
17097
  "request": "pushwoosh.rpc_v2.integrations.GetMetaAuthURLRequest",
17074
17098
  "response": "pushwoosh.rpc_v2.integrations.GetMetaAuthURLResponse",
@@ -17174,7 +17198,9 @@ export const data = {
17174
17198
  "META",
17175
17199
  "INBOUND_WEBHOOK",
17176
17200
  "GOOGLE_BQ",
17177
- "GOOGLE"
17201
+ "GOOGLE",
17202
+ "AZURE",
17203
+ "SALESFORCE"
17178
17204
  ]
17179
17205
  },
17180
17206
  "pushwoosh.rpc_v2.integrations.ImportSegmentPianoRequest": {
@@ -17640,6 +17666,90 @@ export const data = {
17640
17666
  "type": "I",
17641
17667
  "fields": {}
17642
17668
  },
17669
+ "pushwoosh.rpc_v2.integrations.GetOAuthIntegrationRequest": {
17670
+ "type": "I",
17671
+ "fields": {
17672
+ "provider": {
17673
+ "type": "string"
17674
+ }
17675
+ }
17676
+ },
17677
+ "pushwoosh.rpc_v2.integrations.GetOAuthIntegrationResponse": {
17678
+ "type": "I",
17679
+ "fields": {
17680
+ "connected": {
17681
+ "type": "boolean"
17682
+ },
17683
+ "identity": {
17684
+ "type": "string"
17685
+ },
17686
+ "scopes": {
17687
+ "type": "string",
17688
+ "array": true
17689
+ },
17690
+ "tokenValid": {
17691
+ "type": "boolean"
17692
+ },
17693
+ "connectedAt": {
17694
+ "type": "string"
17695
+ },
17696
+ "flow": {
17697
+ "type": "string"
17698
+ }
17699
+ }
17700
+ },
17701
+ "pushwoosh.rpc_v2.integrations.GetOAuthAuthURLRequest": {
17702
+ "type": "I",
17703
+ "fields": {
17704
+ "provider": {
17705
+ "type": "string"
17706
+ },
17707
+ "returnTo": {
17708
+ "type": "string"
17709
+ }
17710
+ }
17711
+ },
17712
+ "pushwoosh.rpc_v2.integrations.GetOAuthAuthURLResponse": {
17713
+ "type": "I",
17714
+ "fields": {
17715
+ "authUrl": {
17716
+ "type": "string"
17717
+ }
17718
+ }
17719
+ },
17720
+ "pushwoosh.rpc_v2.integrations.SetOAuthCredentialsRequest": {
17721
+ "type": "I",
17722
+ "fields": {
17723
+ "provider": {
17724
+ "type": "string"
17725
+ },
17726
+ "tenantId": {
17727
+ "type": "string"
17728
+ },
17729
+ "clientId": {
17730
+ "type": "string"
17731
+ },
17732
+ "clientSecret": {
17733
+ "type": "string"
17734
+ }
17735
+ }
17736
+ },
17737
+ "pushwoosh.rpc_v2.integrations.SetOAuthCredentialsResponse": {
17738
+ "type": "I",
17739
+ "fields": {}
17740
+ },
17741
+ "pushwoosh.rpc_v2.integrations.DeleteOAuthIntegrationRequest": {
17742
+ "type": "I",
17743
+ "fields": {
17744
+ "provider": {
17745
+ "type": "string"
17746
+ }
17747
+ }
17748
+ },
17749
+ "pushwoosh.rpc_v2.integrations.DeleteOAuthIntegrationResponse": {
17750
+ "type": "I",
17751
+ "fields": {}
17752
+ },
17643
17753
  "pushwoosh.rpc_v2.integrations.GetMetaAuthURLRequest": {
17644
17754
  "type": "I",
17645
17755
  "fields": {
package/integrations.d.ts CHANGED
@@ -16,6 +16,10 @@ export type IntegrationsService_DeleteStripeConfiguration = RpcMethod<DeleteStri
16
16
  export type IntegrationsService_GetGoogleAuthURL = RpcMethod<GetGoogleAuthURLRequest, GetGoogleAuthURLResponse>;
17
17
  export type IntegrationsService_GetGoogleConfiguration = RpcMethod<GetGoogleConfigurationRequest, GetGoogleConfigurationResponse>;
18
18
  export type IntegrationsService_DeleteGoogleConfiguration = RpcMethod<DeleteGoogleConfigurationRequest, DeleteGoogleConfigurationResponse>;
19
+ export type IntegrationsService_GetOAuthIntegration = RpcMethod<GetOAuthIntegrationRequest, GetOAuthIntegrationResponse>;
20
+ export type IntegrationsService_GetOAuthAuthURL = RpcMethod<GetOAuthAuthURLRequest, GetOAuthAuthURLResponse>;
21
+ export type IntegrationsService_SetOAuthCredentials = RpcMethod<SetOAuthCredentialsRequest, SetOAuthCredentialsResponse>;
22
+ export type IntegrationsService_DeleteOAuthIntegration = RpcMethod<DeleteOAuthIntegrationRequest, DeleteOAuthIntegrationResponse>;
19
23
  export type IntegrationsService_GetMetaAuthURL = RpcMethod<GetMetaAuthURLRequest, GetMetaAuthURLResponse>;
20
24
  export type IntegrationsService_HandleMetaAuthCallback = RpcMethod<HandleMetaAuthCallbackRequest, HandleMetaAuthCallbackResponse>;
21
25
  export type IntegrationsService_GetMetaConfiguration = RpcMethod<GetMetaConfigurationRequest, GetMetaConfigurationResponse>;
@@ -87,6 +91,17 @@ export interface IntegrationsService {
87
91
  GetGoogleConfiguration: IntegrationsService_GetGoogleConfiguration;
88
92
  /** Removes the Google integration for the current account. Use to disconnect Google; the grant is revoked at Google and cannot be restored without reconnecting. */
89
93
  DeleteGoogleConfiguration: IntegrationsService_DeleteGoogleConfiguration;
94
+ /**
95
+ * oauth
96
+ * Returns how one OAuth provider is connected for the current account: the identity, granted scopes, whether the stored grant is still valid, and which connect flow the provider uses. Use before offering a feature that calls that provider's API.
97
+ */
98
+ GetOAuthIntegration: IntegrationsService_GetOAuthIntegration;
99
+ /** Builds the consent URL of a provider connected through a browser redirect, given the control panel page to return to. Refused for providers connected with credentials instead. */
100
+ GetOAuthAuthURL: IntegrationsService_GetOAuthAuthURL;
101
+ /** Connects a provider that has no consent screen by storing the account's own application registration. The secret is write-only: it is never returned by any read. */
102
+ SetOAuthCredentials: IntegrationsService_SetOAuthCredentials;
103
+ /** Removes an OAuth integration for the current account; the grant is revoked at the provider and cannot be restored without connecting again. */
104
+ DeleteOAuthIntegration: IntegrationsService_DeleteOAuthIntegration;
90
105
  /**
91
106
  * meta
92
107
  * Builds the Meta (Facebook) OAuth authorization URL to start connecting a Meta account, given a redirect URI. Use to begin the Meta connect flow; the user returns via connect_meta_integration.
@@ -130,7 +145,7 @@ export interface IntegrationsService {
130
145
  ListGoogleBQTables: IntegrationsService_ListGoogleBQTables;
131
146
  }
132
147
  /** Integration contains all available integration for clients (to update props) */
133
- export type Integration = 'UNKNOWN' | 'SEGMENT' | 'PIANO' | 'WEBHOOK' | 'HUBSPOT' | 'SHOPIFY' | 'STRIPE' | 'META' | 'INBOUND_WEBHOOK' | 'GOOGLE_BQ' | 'GOOGLE';
148
+ export type Integration = 'UNKNOWN' | 'SEGMENT' | 'PIANO' | 'WEBHOOK' | 'HUBSPOT' | 'SHOPIFY' | 'STRIPE' | 'META' | 'INBOUND_WEBHOOK' | 'GOOGLE_BQ' | 'GOOGLE' | 'AZURE' | 'SALESFORCE';
134
149
  export type ImportSegmentPianoRequest = {
135
150
  /** application code */
136
151
  application?: string;
@@ -330,6 +345,46 @@ export type GetGoogleConfigurationResponse = {
330
345
  };
331
346
  export type DeleteGoogleConfigurationRequest = {};
332
347
  export type DeleteGoogleConfigurationResponse = {};
348
+ export type GetOAuthIntegrationRequest = {
349
+ /** provider name integration-oauth knows, e.g. "google" or "azure" */
350
+ provider?: string;
351
+ };
352
+ export type GetOAuthIntegrationResponse = {
353
+ /** false when the account never connected this provider */
354
+ connected: boolean;
355
+ /** who the connection belongs to at the provider: an email, or the Entra tenant */
356
+ identity: string;
357
+ /** scopes actually granted */
358
+ scopes: string[];
359
+ /** false once the provider rejected the stored grant; reconnect required */
360
+ tokenValid: boolean;
361
+ /** RFC 3339 */
362
+ connectedAt: string;
363
+ /** "authorization_code" (consent screen) or "client_credentials" (credentials form); empty while the provider is not connected */
364
+ flow: string;
365
+ };
366
+ export type GetOAuthAuthURLRequest = {
367
+ provider?: string;
368
+ /** control panel URL the browser lands on after the consent screen */
369
+ returnTo?: string;
370
+ };
371
+ export type GetOAuthAuthURLResponse = {
372
+ authUrl: string;
373
+ };
374
+ export type SetOAuthCredentialsRequest = {
375
+ provider?: string;
376
+ /** directory the application lives in, for providers whose token endpoint is per tenant */
377
+ tenantId?: string;
378
+ /** application (client) id of the account's own registration */
379
+ clientId?: string;
380
+ /** its secret; write-only, never returned by a read */
381
+ clientSecret?: string;
382
+ };
383
+ export type SetOAuthCredentialsResponse = {};
384
+ export type DeleteOAuthIntegrationRequest = {
385
+ provider?: string;
386
+ };
387
+ export type DeleteOAuthIntegrationResponse = {};
333
388
  /** Meta messages */
334
389
  export type GetMetaAuthURLRequest = {
335
390
  /** URI Meta redirects back to after authorization */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushwoosh/rpc-v2-http-api-data",
3
- "version": "0.2.224",
3
+ "version": "0.2.226",
4
4
  "description": "RPC V2 HTTP API Types and Data",
5
5
  "main": "index.js",
6
6
  "module": "index.js",