@pushwoosh/rpc-v2-http-api-data 0.2.378 → 0.2.381
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 +32 -0
- package/canva.js +3 -0
- package/data.js +93 -0
- package/index.d.ts +2 -0
- package/integrations.d.ts +15 -0
- package/package.json +1 -1
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
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",
|
|
@@ -20776,6 +20837,12 @@ export const data = {
|
|
|
20776
20837
|
"method": "put",
|
|
20777
20838
|
"path": "/api/integrations/oauth/{provider}/credentials"
|
|
20778
20839
|
},
|
|
20840
|
+
"CompleteOAuthAuthorization": {
|
|
20841
|
+
"request": "pushwoosh.rpc_v2.integrations.CompleteOAuthAuthorizationRequest",
|
|
20842
|
+
"response": "pushwoosh.rpc_v2.integrations.CompleteOAuthAuthorizationResponse",
|
|
20843
|
+
"method": "post",
|
|
20844
|
+
"path": "/api/integrations/oauth/{provider}/complete"
|
|
20845
|
+
},
|
|
20779
20846
|
"DeleteOAuthIntegration": {
|
|
20780
20847
|
"request": "pushwoosh.rpc_v2.integrations.DeleteOAuthIntegrationRequest",
|
|
20781
20848
|
"response": "pushwoosh.rpc_v2.integrations.DeleteOAuthIntegrationResponse",
|
|
@@ -21477,6 +21544,32 @@ export const data = {
|
|
|
21477
21544
|
}
|
|
21478
21545
|
}
|
|
21479
21546
|
},
|
|
21547
|
+
"pushwoosh.rpc_v2.integrations.CompleteOAuthAuthorizationRequest": {
|
|
21548
|
+
"type": "I",
|
|
21549
|
+
"fields": {
|
|
21550
|
+
"provider": {
|
|
21551
|
+
"type": "string"
|
|
21552
|
+
},
|
|
21553
|
+
"state": {
|
|
21554
|
+
"type": "string"
|
|
21555
|
+
},
|
|
21556
|
+
"code": {
|
|
21557
|
+
"type": "string"
|
|
21558
|
+
}
|
|
21559
|
+
}
|
|
21560
|
+
},
|
|
21561
|
+
"pushwoosh.rpc_v2.integrations.CompleteOAuthAuthorizationResponse": {
|
|
21562
|
+
"type": "I",
|
|
21563
|
+
"fields": {
|
|
21564
|
+
"identity": {
|
|
21565
|
+
"type": "string"
|
|
21566
|
+
},
|
|
21567
|
+
"scopes": {
|
|
21568
|
+
"type": "string",
|
|
21569
|
+
"array": true
|
|
21570
|
+
}
|
|
21571
|
+
}
|
|
21572
|
+
},
|
|
21480
21573
|
"pushwoosh.rpc_v2.integrations.GetOAuthAuthURLRequest": {
|
|
21481
21574
|
"type": "I",
|
|
21482
21575
|
"fields": {
|
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 */
|