@pushwoosh/rpc-v2-http-api-data 0.2.379 → 0.2.382

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/canva.d.ts ADDED
@@ -0,0 +1,32 @@
1
+ import { RpcMethod } from './commonTypes';
2
+ export type CanvaService_ListDesigns = RpcMethod<ListCanvaDesignsRequest, ListCanvaDesignsResponse>;
3
+ /**
4
+ * CanvaService reads the calling user's own Canva designs for the Media Library import. The user
5
+ * connects Canva once through the OAuth integration endpoints with provider "canva".
6
+ */
7
+ export interface CanvaService {
8
+ /** Lists the calling user's Canva designs, newest edited first, optionally filtered by a title search; pass continuation from the previous page to read the next. Needs that user's own Canva connection and a signed-in user: API tokens are refused, because a Canva grant opens one person's designs. */
9
+ ListDesigns: CanvaService_ListDesigns;
10
+ }
11
+ export type ListCanvaDesignsRequest = {
12
+ /** Title search; empty lists every design the user can access. */
13
+ query?: string;
14
+ /** Opaque token from the previous page; empty reads the first page. */
15
+ continuation?: string;
16
+ };
17
+ export type CanvaDesign = {
18
+ id: string;
19
+ /** Empty for a design never renamed in Canva. */
20
+ title: string;
21
+ pageCount: number;
22
+ /** Canva's own preview URL; it expires about 15 minutes after the listing. */
23
+ thumbnailUrl: string;
24
+ thumbnailWidth: number;
25
+ thumbnailHeight: number;
26
+ updatedAt: Date;
27
+ };
28
+ export type ListCanvaDesignsResponse = {
29
+ designs: CanvaDesign[];
30
+ /** Token for the next page; empty on the last one. */
31
+ continuation: string;
32
+ };
package/canva.js ADDED
@@ -0,0 +1,3 @@
1
+ /* eslint-disable */
2
+ /* Autogenerated code */
3
+ export {};
package/data.js CHANGED
@@ -8746,6 +8746,67 @@ export const data = {
8746
8746
  "type": "I",
8747
8747
  "fields": {}
8748
8748
  },
8749
+ "pushwoosh.rpc_v2.canva.CanvaService": {
8750
+ "type": "S",
8751
+ "key": "canva",
8752
+ "methods": {
8753
+ "ListDesigns": {
8754
+ "request": "pushwoosh.rpc_v2.canva.ListCanvaDesignsRequest",
8755
+ "response": "pushwoosh.rpc_v2.canva.ListCanvaDesignsResponse",
8756
+ "method": "get",
8757
+ "path": "/api/canva/designs"
8758
+ }
8759
+ }
8760
+ },
8761
+ "pushwoosh.rpc_v2.canva.ListCanvaDesignsRequest": {
8762
+ "type": "I",
8763
+ "fields": {
8764
+ "query": {
8765
+ "type": "string"
8766
+ },
8767
+ "continuation": {
8768
+ "type": "string"
8769
+ }
8770
+ }
8771
+ },
8772
+ "pushwoosh.rpc_v2.canva.CanvaDesign": {
8773
+ "type": "I",
8774
+ "fields": {
8775
+ "id": {
8776
+ "type": "string"
8777
+ },
8778
+ "title": {
8779
+ "type": "string"
8780
+ },
8781
+ "pageCount": {
8782
+ "type": "number"
8783
+ },
8784
+ "thumbnailUrl": {
8785
+ "type": "string"
8786
+ },
8787
+ "thumbnailWidth": {
8788
+ "type": "number"
8789
+ },
8790
+ "thumbnailHeight": {
8791
+ "type": "number"
8792
+ },
8793
+ "updatedAt": {
8794
+ "type": "Date"
8795
+ }
8796
+ }
8797
+ },
8798
+ "pushwoosh.rpc_v2.canva.ListCanvaDesignsResponse": {
8799
+ "type": "I",
8800
+ "fields": {
8801
+ "designs": {
8802
+ "type": "pushwoosh.rpc_v2.canva.CanvaDesign",
8803
+ "array": true
8804
+ },
8805
+ "continuation": {
8806
+ "type": "string"
8807
+ }
8808
+ }
8809
+ },
8749
8810
  "pushwoosh.rpc_v2.catalog.CatalogService": {
8750
8811
  "type": "S",
8751
8812
  "key": "catalog",
@@ -19785,6 +19846,24 @@ export const data = {
19785
19846
  "response": "pushwoosh.rpc_v2.inapp_messages.PublishInappResponse",
19786
19847
  "method": "post",
19787
19848
  "path": "/api/inapp_messages/{code}:publish"
19849
+ },
19850
+ "StopInappMessages": {
19851
+ "request": "pushwoosh.rpc_v2.inapp_messages.StopInappMessagesRequest",
19852
+ "response": "pushwoosh.rpc_v2.inapp_messages.StopInappMessagesResponse",
19853
+ "method": "post",
19854
+ "path": "/api/inapp_messages/stop"
19855
+ },
19856
+ "PublishInappMessages": {
19857
+ "request": "pushwoosh.rpc_v2.inapp_messages.PublishInappMessagesRequest",
19858
+ "response": "pushwoosh.rpc_v2.inapp_messages.PublishInappMessagesResponse",
19859
+ "method": "post",
19860
+ "path": "/api/inapp_messages/publish"
19861
+ },
19862
+ "DeleteInappMessages": {
19863
+ "request": "pushwoosh.rpc_v2.inapp_messages.DeleteInappMessagesRequest",
19864
+ "response": "pushwoosh.rpc_v2.inapp_messages.DeleteInappMessagesResponse",
19865
+ "method": "post",
19866
+ "path": "/api/inapp_messages/delete"
19788
19867
  }
19789
19868
  }
19790
19869
  },
@@ -20182,6 +20261,54 @@ export const data = {
20182
20261
  }
20183
20262
  }
20184
20263
  },
20264
+ "pushwoosh.rpc_v2.inapp_messages.StopInappMessagesRequest": {
20265
+ "type": "I",
20266
+ "fields": {
20267
+ "application": {
20268
+ "type": "string"
20269
+ },
20270
+ "codes": {
20271
+ "type": "string",
20272
+ "array": true
20273
+ }
20274
+ }
20275
+ },
20276
+ "pushwoosh.rpc_v2.inapp_messages.StopInappMessagesResponse": {
20277
+ "type": "I",
20278
+ "fields": {}
20279
+ },
20280
+ "pushwoosh.rpc_v2.inapp_messages.PublishInappMessagesRequest": {
20281
+ "type": "I",
20282
+ "fields": {
20283
+ "application": {
20284
+ "type": "string"
20285
+ },
20286
+ "codes": {
20287
+ "type": "string",
20288
+ "array": true
20289
+ }
20290
+ }
20291
+ },
20292
+ "pushwoosh.rpc_v2.inapp_messages.PublishInappMessagesResponse": {
20293
+ "type": "I",
20294
+ "fields": {}
20295
+ },
20296
+ "pushwoosh.rpc_v2.inapp_messages.DeleteInappMessagesRequest": {
20297
+ "type": "I",
20298
+ "fields": {
20299
+ "application": {
20300
+ "type": "string"
20301
+ },
20302
+ "codes": {
20303
+ "type": "string",
20304
+ "array": true
20305
+ }
20306
+ }
20307
+ },
20308
+ "pushwoosh.rpc_v2.inapp_messages.DeleteInappMessagesResponse": {
20309
+ "type": "I",
20310
+ "fields": {}
20311
+ },
20185
20312
  "pushwoosh.rpc_v2.inbound_webhooks.InboundWebhooksService": {
20186
20313
  "type": "S",
20187
20314
  "key": "inboundWebhooks",
@@ -20776,6 +20903,12 @@ export const data = {
20776
20903
  "method": "put",
20777
20904
  "path": "/api/integrations/oauth/{provider}/credentials"
20778
20905
  },
20906
+ "CompleteOAuthAuthorization": {
20907
+ "request": "pushwoosh.rpc_v2.integrations.CompleteOAuthAuthorizationRequest",
20908
+ "response": "pushwoosh.rpc_v2.integrations.CompleteOAuthAuthorizationResponse",
20909
+ "method": "post",
20910
+ "path": "/api/integrations/oauth/{provider}/complete"
20911
+ },
20779
20912
  "DeleteOAuthIntegration": {
20780
20913
  "request": "pushwoosh.rpc_v2.integrations.DeleteOAuthIntegrationRequest",
20781
20914
  "response": "pushwoosh.rpc_v2.integrations.DeleteOAuthIntegrationResponse",
@@ -21477,6 +21610,32 @@ export const data = {
21477
21610
  }
21478
21611
  }
21479
21612
  },
21613
+ "pushwoosh.rpc_v2.integrations.CompleteOAuthAuthorizationRequest": {
21614
+ "type": "I",
21615
+ "fields": {
21616
+ "provider": {
21617
+ "type": "string"
21618
+ },
21619
+ "state": {
21620
+ "type": "string"
21621
+ },
21622
+ "code": {
21623
+ "type": "string"
21624
+ }
21625
+ }
21626
+ },
21627
+ "pushwoosh.rpc_v2.integrations.CompleteOAuthAuthorizationResponse": {
21628
+ "type": "I",
21629
+ "fields": {
21630
+ "identity": {
21631
+ "type": "string"
21632
+ },
21633
+ "scopes": {
21634
+ "type": "string",
21635
+ "array": true
21636
+ }
21637
+ }
21638
+ },
21480
21639
  "pushwoosh.rpc_v2.integrations.GetOAuthAuthURLRequest": {
21481
21640
  "type": "I",
21482
21641
  "fields": {
@@ -7,6 +7,9 @@ export type InAppMessagesService_Create = RpcMethod<CreateInappRequest, CreateIn
7
7
  export type InAppMessagesService_Update = RpcMethod<UpdateInappRequest, UpdateInappResponse>;
8
8
  export type InAppMessagesService_Stop = RpcMethod<StopInappRequest, StopInappResponse>;
9
9
  export type InAppMessagesService_Publish = RpcMethod<PublishInappRequest, PublishInappResponse>;
10
+ export type InAppMessagesService_StopInappMessages = RpcMethod<StopInappMessagesRequest, StopInappMessagesResponse>;
11
+ export type InAppMessagesService_PublishInappMessages = RpcMethod<PublishInappMessagesRequest, PublishInappMessagesResponse>;
12
+ export type InAppMessagesService_DeleteInappMessages = RpcMethod<DeleteInappMessagesRequest, DeleteInappMessagesResponse>;
10
13
  export interface InAppMessagesService {
11
14
  /** Lists in-app messages for an application (format XXXXX-XXXXX), newest first, with paging, name/code search and an optional status filter. Use to browse in-app messages or find an in-app message code before fetching, editing or publishing one. */
12
15
  List: InAppMessagesService_List;
@@ -22,6 +25,12 @@ export interface InAppMessagesService {
22
25
  Stop: InAppMessagesService_Stop;
23
26
  /** Activates a draft in-app message by code after validating it has a name, a trigger filter expression and rich media. Use to publish a prepared draft; the reverse is disable_inapp_message. */
24
27
  Publish: InAppMessagesService_Publish;
28
+ /** Stops several active in-app messages of an application (code XXXXX-XXXXX) in one request, up to 1000 codes. All-or-nothing: if any code is not found or is not active (scheduled ones included), nothing changes. Use disable_inapp_message for a single one. */
29
+ StopInappMessages: InAppMessagesService_StopInappMessages;
30
+ /** Resumes several stopped in-app messages of an application (code XXXXX-XXXXX) in one request, up to 1000 codes, with the same checks as enable_inapp_message. All-or-nothing: if any code is not found, not stopped or fails the checks, nothing changes. */
31
+ PublishInappMessages: InAppMessagesService_PublishInappMessages;
32
+ /** Permanently deletes several in-app messages of an application (code XXXXX-XXXXX) in one request, up to 1000 codes. Active and scheduled ones can't be deleted. All-or-nothing: if any code is not found or is active or scheduled, nothing is deleted. */
33
+ DeleteInappMessages: InAppMessagesService_DeleteInappMessages;
25
34
  }
26
35
  export type ListInappMessagesRequest_OrderBy = 'CREATED' | 'NAME' | 'UPDATED';
27
36
  export type ListInappMessagesRequest_OrderDirection = 'DESC' | 'ASC';
@@ -163,3 +172,24 @@ export type PublishInappRequest = {
163
172
  export type PublishInappResponse = {
164
173
  code: string;
165
174
  };
175
+ export type StopInappMessagesRequest = {
176
+ /** Application code (XXXXX-XXXXX) the in-app messages belong to. */
177
+ application?: string;
178
+ /** In-app message codes to stop. */
179
+ codes?: string[];
180
+ };
181
+ export type StopInappMessagesResponse = {};
182
+ export type PublishInappMessagesRequest = {
183
+ /** Application code (XXXXX-XXXXX) the in-app messages belong to. */
184
+ application?: string;
185
+ /** In-app message codes to resume. */
186
+ codes?: string[];
187
+ };
188
+ export type PublishInappMessagesResponse = {};
189
+ export type DeleteInappMessagesRequest = {
190
+ /** Application code (XXXXX-XXXXX) the in-app messages belong to. */
191
+ application?: string;
192
+ /** In-app message codes to delete. */
193
+ codes?: string[];
194
+ };
195
+ export type DeleteInappMessagesResponse = {};
package/index.d.ts CHANGED
@@ -18,6 +18,7 @@ import { ApplicationsInfoService as pushwoosh_rpc_v2_applications_info_Applicati
18
18
  import { ApplicationsStatisticsService as pushwoosh_rpc_v2_applications_statistics_ApplicationsStatisticsService } from './applications_statistics';
19
19
  import { ApprovalsService as pushwoosh_rpc_v2_approvals_ApprovalsService } from './approvals';
20
20
  import { CampaignsService as pushwoosh_rpc_v2_campaigns_CampaignsService } from './campaigns';
21
+ import { CanvaService as pushwoosh_rpc_v2_canva_CanvaService } from './canva';
21
22
  import { CatalogService as pushwoosh_rpc_v2_catalog_CatalogService } from './catalog';
22
23
  import { CategoriesService as pushwoosh_rpc_v2_categories_CategoriesService } from './categories';
23
24
  import { MessagesInProgressService as pushwoosh_channels_messagingApi_v2_MessagesInProgressService } from './pushwoosh_channels_messagingApi_v2';
@@ -97,6 +98,7 @@ export type API = {
97
98
  applicationsStatistics: pushwoosh_rpc_v2_applications_statistics_ApplicationsStatisticsService;
98
99
  approvals: pushwoosh_rpc_v2_approvals_ApprovalsService;
99
100
  campaigns: pushwoosh_rpc_v2_campaigns_CampaignsService;
101
+ canva: pushwoosh_rpc_v2_canva_CanvaService;
100
102
  catalog: pushwoosh_rpc_v2_catalog_CatalogService;
101
103
  categories: pushwoosh_rpc_v2_categories_CategoriesService;
102
104
  messagesInProgress: pushwoosh_channels_messagingApi_v2_MessagesInProgressService;
package/integrations.d.ts CHANGED
@@ -19,6 +19,7 @@ export type IntegrationsService_DeleteGoogleConfiguration = RpcMethod<DeleteGoog
19
19
  export type IntegrationsService_GetOAuthIntegration = RpcMethod<GetOAuthIntegrationRequest, GetOAuthIntegrationResponse>;
20
20
  export type IntegrationsService_GetOAuthAuthURL = RpcMethod<GetOAuthAuthURLRequest, GetOAuthAuthURLResponse>;
21
21
  export type IntegrationsService_SetOAuthCredentials = RpcMethod<SetOAuthCredentialsRequest, SetOAuthCredentialsResponse>;
22
+ export type IntegrationsService_CompleteOAuthAuthorization = RpcMethod<CompleteOAuthAuthorizationRequest, CompleteOAuthAuthorizationResponse>;
22
23
  export type IntegrationsService_DeleteOAuthIntegration = RpcMethod<DeleteOAuthIntegrationRequest, DeleteOAuthIntegrationResponse>;
23
24
  export type IntegrationsService_GetMetaAuthURL = RpcMethod<GetMetaAuthURLRequest, GetMetaAuthURLResponse>;
24
25
  export type IntegrationsService_HandleMetaAuthCallback = RpcMethod<HandleMetaAuthCallbackRequest, HandleMetaAuthCallbackResponse>;
@@ -114,6 +115,8 @@ export interface IntegrationsService {
114
115
  GetOAuthAuthURL: IntegrationsService_GetOAuthAuthURL;
115
116
  /** 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. */
116
117
  SetOAuthCredentials: IntegrationsService_SetOAuthCredentials;
118
+ /** Finishes connecting a provider that keeps one connection per user (Canva): after consent the browser returns with oauth_code and oauth_state in the URL fragment, and the same signed-in user posts them here. Refused for API tokens and for a consent started by another user. */
119
+ CompleteOAuthAuthorization: IntegrationsService_CompleteOAuthAuthorization;
117
120
  /** Removes an OAuth integration for the current account; the grant is revoked at the provider and cannot be restored without connecting again. */
118
121
  DeleteOAuthIntegration: IntegrationsService_DeleteOAuthIntegration;
119
122
  /**
@@ -410,6 +413,18 @@ export type GetOAuthIntegrationResponse = {
410
413
  /** "authorization_code" (consent screen) or "client_credentials" (credentials form); empty while the provider is not connected */
411
414
  flow: string;
412
415
  };
416
+ export type CompleteOAuthAuthorizationRequest = {
417
+ provider?: string;
418
+ /** oauth_state from the URL fragment the provider's consent returned to. */
419
+ state?: string;
420
+ /** oauth_code from the same fragment. */
421
+ code?: string;
422
+ };
423
+ export type CompleteOAuthAuthorizationResponse = {
424
+ /** Account at the provider the grant belongs to, e.g. the Canva display name. */
425
+ identity: string;
426
+ scopes: string[];
427
+ };
413
428
  export type GetOAuthAuthURLRequest = {
414
429
  provider?: string;
415
430
  /** control panel URL the browser lands on after the consent screen */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushwoosh/rpc-v2-http-api-data",
3
- "version": "0.2.379",
3
+ "version": "0.2.382",
4
4
  "description": "RPC V2 HTTP API Types and Data",
5
5
  "main": "index.js",
6
6
  "module": "index.js",