planvortex 0.1.0 → 0.2.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.
- package/dist/{chunk-HSMIRBF3.js → chunk-GUYS6XTO.js} +3 -3
- package/dist/{chunk-HSMIRBF3.js.map → chunk-GUYS6XTO.js.map} +1 -1
- package/dist/{index-DOC-BT2F.d.cts → index-Bs_Usq51.d.cts} +60 -12
- package/dist/{index-DOC-BT2F.d.ts → index-Bs_Usq51.d.ts} +60 -12
- package/dist/index.cjs +17 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +18 -4
- package/dist/index.d.ts +18 -4
- package/dist/index.js +18 -4
- package/dist/index.js.map +1 -1
- package/dist/webhooks/index.cjs +1 -1
- package/dist/webhooks/index.cjs.map +1 -1
- package/dist/webhooks/index.d.cts +1 -1
- package/dist/webhooks/index.d.ts +1 -1
- package/dist/webhooks/index.js +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { P as Paginated, S as SocialNetwork, C as ConnectLink, a as ConnectResult, E as EnableResult, A as Account, b as AccountMetrics, c as PersistentMenu, d as Publication, e as AiPlanCreateRequest, f as AiPlanCreateResult, g as AiPlan, h as ClientApp, i as ClientAppInput, j as SocialCapabilities, k as CommentActions, l as SocialLimits, m as PublicationLimits, n as AspectRatiosByNetwork, o as CommentNetwork, p as Comment, q as CommentThread, r as CommentReplyResult, s as ContactExtraData, t as Contact, u as ContactCreate, v as ContactUpdate, D as Dashboard, M as MetricName, w as DashboardMetricsResult, x as PublicationsSummaryResult, T as TopPublicationsResult, y as PublicationsStatsResult, z as PlanUse, I as IntegrationProviderName, B as IntegrationProvider, F as Integration, G as IntegrationConnectRequest, H as IntegrationUpdate, J as IntegrationPickerConfig, K as MessageTemplate, L as Conversation, N as ConversationTotals, O as Message, Q as MessageInput, R as Client, U as Organization, V as AiSettings, W as ClientWithOrganizations, X as PlanData, Y as ConnectToken, Z as AiContext, _ as SocialCredentialsInput, $ as Product, a0 as ProductInput, a1 as ProductCatalog, a2 as ProductCatalogInput, a3 as PublicationInput, a4 as PublicationState, a5 as PublicationStats, a6 as PublicationStatsHistory, a7 as Upload } from './index-
|
|
2
|
-
export { a8 as AccountError, a9 as AccountMetricRow, aa as AccountStateChange, ab as AccountWebhookChangeBase, ac as AccountWithError, ad as AiPlanCostEstimate, ae as AiPlanError, af as AiPlanOptions, ag as AiPlanOptionsInput, ah as AiPlanState, ai as ApiErrorBody, aj as AspectRatios, ak as AuthError, al as ClientPlan, am as CommentAuthor, an as CommentChange, ao as ContactChannel, ap as ContactError, aq as DashboardAiPlanRef, ar as DashboardPublicationRef, as as DashboardRange, at as EngagementBase, au as FileError, av as FileFormat, aw as FileProperties, ax as FileType, ay as IntegrationError, az as IntegrationErrorChange, aA as MessageChange, aB as MessageOptions, aC as MessageType, aD as MessagingError, aE as MetricRow, aF as NO_ERROR_CODE, aG as OpenApiComponents, aH as OpenApiOperations, aI as OpenApiPaths, aJ as OpenApiWebhooks, aK as OpenEnum, aL as OrganizationError, aM as PLANVORTEX_ERROR_RANGES, aN as PlanLimitError, aO as PlanVortexAuthenticationError, aP as PlanVortexConfigError, aQ as PlanVortexConnectionError, aR as PlanVortexError, aS as PlanVortexErrorOptions, aT as PlanVortexErrorRange, aU as ProductError, aV as PublicationError, aW as PublicationErrorDetail, aX as PublicationMetrics, aY as PublicationStatsPoint, aZ as PublicationType, a_ as PublicationsSummary, a$ as RssConfig, b0 as
|
|
1
|
+
import { P as Paginated, S as SocialNetwork, C as ConnectLink, a as ConnectResult, E as EnableResult, A as Account, b as AccountMetrics, c as PersistentMenu, d as Publication, e as AiPlanCreateRequest, f as AiPlanCreateResult, g as AiPlan, h as ClientApp, i as ClientAppInput, j as SocialCapabilities, k as CommentActions, l as SocialLimits, m as PublicationLimits, n as AspectRatiosByNetwork, o as CommentNetwork, p as Comment, q as CommentThread, r as CommentReplyResult, s as ContactExtraData, t as Contact, u as ContactCreate, v as ContactUpdate, D as Dashboard, M as MetricName, w as DashboardMetricsResult, x as PublicationsSummaryResult, T as TopPublicationsResult, y as PublicationsStatsResult, z as PlanUse, I as IntegrationProviderName, B as IntegrationProvider, F as Integration, G as IntegrationConnectRequest, H as IntegrationUpdate, J as IntegrationPickerConfig, K as MessageTemplate, L as Conversation, N as ConversationTotals, O as Message, Q as MessageInput, R as Client, U as Organization, V as AiSettings, W as ClientWithOrganizations, X as PlanData, Y as ConnectToken, Z as AiContext, _ as SocialCredentialsInput, $ as Product, a0 as ProductInput, a1 as ProductCatalog, a2 as ProductCatalogInput, a3 as PublicationInput, a4 as PublicationState, a5 as PublicationStats, a6 as PublicationStatsHistory, a7 as Upload } from './index-Bs_Usq51.cjs';
|
|
2
|
+
export { a8 as AccountError, a9 as AccountMetricRow, aa as AccountStateChange, ab as AccountWebhookChangeBase, ac as AccountWithError, ad as AiPlanCostEstimate, ae as AiPlanError, af as AiPlanOptions, ag as AiPlanOptionsInput, ah as AiPlanState, ai as ApiErrorBody, aj as AspectRatios, ak as AuthError, al as ClientPlan, am as CommentAuthor, an as CommentChange, ao as ContactChannel, ap as ContactError, aq as DashboardAiPlanRef, ar as DashboardPublicationRef, as as DashboardRange, at as EngagementBase, au as FileError, av as FileFormat, aw as FileProperties, ax as FileType, ay as IntegrationError, az as IntegrationErrorChange, aA as MessageChange, aB as MessageOptions, aC as MessageType, aD as MessagingError, aE as MetricRow, aF as NO_ERROR_CODE, aG as OpenApiComponents, aH as OpenApiOperations, aI as OpenApiPaths, aJ as OpenApiWebhooks, aK as OpenEnum, aL as OrganizationError, aM as PLANVORTEX_ERROR_RANGES, aN as PlanLimitError, aO as PlanVortexAuthenticationError, aP as PlanVortexConfigError, aQ as PlanVortexConnectionError, aR as PlanVortexError, aS as PlanVortexErrorOptions, aT as PlanVortexErrorRange, aU as ProductError, aV as PublicationError, aW as PublicationErrorDetail, aX as PublicationMetrics, aY as PublicationStatsPoint, aZ as PublicationType, a_ as PublicationsSummary, a$ as RssConfig, b0 as SocialAuthorizationMethod, b1 as SocialCredentials, b2 as SocialIdentifier, b3 as SocialIdentifierInput, b4 as SocialLimitsMap, b5 as TOKEN_ERROR_CODES, b6 as TopPublication, b7 as UnknownWebhookChange, b8 as UserError, b9 as WebhookAlgorithm, ba as WebhookChange, bb as WebhookEvent, bc as WithAccount, bd as WithPublication, be as account, bf as accountId, bg as errorFamilyForCode, bh as isPlanVortexError, bi as isTokenError, bj as messageContact, bk as messageContactId, bl as messageDirection, bm as messageFileIds, bn as messageFiles, bo as publication, bp as publicationId } from './index-Bs_Usq51.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Las dos constantes que todo lo demás necesita. Viven aparte de `index.ts` para que `client.ts`
|
|
@@ -15,7 +15,7 @@ declare const PLANVORTEX_API_URL = "https://api.planvortex.com/v1.0.0";
|
|
|
15
15
|
* de ejecución obliga a empaquetarlo y se rompe distinto en ESM y en CJS. La mantiene sincronizada
|
|
16
16
|
* un test.
|
|
17
17
|
*/
|
|
18
|
-
declare const VERSION = "0.
|
|
18
|
+
declare const VERSION = "0.2.0";
|
|
19
19
|
|
|
20
20
|
/** `fetch` con la firma que usamos. Se puede sustituir en tests o para meter un proxy. */
|
|
21
21
|
type FetchLike = (input: string, init: RequestInit) => Promise<Response>;
|
|
@@ -222,6 +222,12 @@ declare class AccountsResource extends Resource {
|
|
|
222
222
|
* no un fallo: es lo que pasa con Discord en una organización que todavía no ha guardado sus
|
|
223
223
|
* propias credenciales de bot.
|
|
224
224
|
*
|
|
225
|
+
* **MIRA `authorization`, NO si `link` está vacío.** Nueve de las diez redes son `redirect` y se
|
|
226
|
+
* manda a la persona a `link`. **WhatsApp no es una URL**: su alta es el Embedded Signup de
|
|
227
|
+
* Meta, un popup que levantas tú con el SDK de JavaScript de Facebook, así que su `link` es
|
|
228
|
+
* cadena vacía y lo que necesitas para abrirlo viaja en `authorization` — ver {@link ConnectLink}.
|
|
229
|
+
* Recorrer la lista redirigiendo a `link` manda a tu usuario a tu propia página.
|
|
230
|
+
*
|
|
225
231
|
* OJO: la red devuelve al usuario a un front de PlanVortex, no a una URL tuya — ver
|
|
226
232
|
* `redirect_uri` en {@link ConnectLinksOptions}.
|
|
227
233
|
*/
|
|
@@ -1336,7 +1342,15 @@ declare class OrganizationsResource extends Resource {
|
|
|
1336
1342
|
* - **`token`** — el credencial suelto, para `pv.asTemporalToken(token)` cuando la interfaz la
|
|
1337
1343
|
* pone el integrador.
|
|
1338
1344
|
*
|
|
1339
|
-
* Caduca en
|
|
1345
|
+
* Caduca en **quince minutos** y **sólo vale para esta organización**: usarlo contra otra
|
|
1346
|
+
* contesta 1101.
|
|
1347
|
+
*
|
|
1348
|
+
* **Y conecta una vez.** En cuanto un `accounts.connect` sale bien, ese token deja de poder
|
|
1349
|
+
* conectar y contesta 543; los `accounts.enable` que rematan esa misma conexión siguen valiendo
|
|
1350
|
+
* hasta que caduque. Emite uno por conexión: son gratis e inmediatos.
|
|
1351
|
+
*
|
|
1352
|
+
* **Si pasas `social_network`, el token queda atado a esa red** y no conecta ninguna otra (544).
|
|
1353
|
+
* Sin ella, el token abre cualquiera y es la persona quien elige.
|
|
1340
1354
|
*/
|
|
1341
1355
|
createConnectToken(idOrganization: string, options?: ConnectTokenOptions): Promise<ConnectToken>;
|
|
1342
1356
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { P as Paginated, S as SocialNetwork, C as ConnectLink, a as ConnectResult, E as EnableResult, A as Account, b as AccountMetrics, c as PersistentMenu, d as Publication, e as AiPlanCreateRequest, f as AiPlanCreateResult, g as AiPlan, h as ClientApp, i as ClientAppInput, j as SocialCapabilities, k as CommentActions, l as SocialLimits, m as PublicationLimits, n as AspectRatiosByNetwork, o as CommentNetwork, p as Comment, q as CommentThread, r as CommentReplyResult, s as ContactExtraData, t as Contact, u as ContactCreate, v as ContactUpdate, D as Dashboard, M as MetricName, w as DashboardMetricsResult, x as PublicationsSummaryResult, T as TopPublicationsResult, y as PublicationsStatsResult, z as PlanUse, I as IntegrationProviderName, B as IntegrationProvider, F as Integration, G as IntegrationConnectRequest, H as IntegrationUpdate, J as IntegrationPickerConfig, K as MessageTemplate, L as Conversation, N as ConversationTotals, O as Message, Q as MessageInput, R as Client, U as Organization, V as AiSettings, W as ClientWithOrganizations, X as PlanData, Y as ConnectToken, Z as AiContext, _ as SocialCredentialsInput, $ as Product, a0 as ProductInput, a1 as ProductCatalog, a2 as ProductCatalogInput, a3 as PublicationInput, a4 as PublicationState, a5 as PublicationStats, a6 as PublicationStatsHistory, a7 as Upload } from './index-
|
|
2
|
-
export { a8 as AccountError, a9 as AccountMetricRow, aa as AccountStateChange, ab as AccountWebhookChangeBase, ac as AccountWithError, ad as AiPlanCostEstimate, ae as AiPlanError, af as AiPlanOptions, ag as AiPlanOptionsInput, ah as AiPlanState, ai as ApiErrorBody, aj as AspectRatios, ak as AuthError, al as ClientPlan, am as CommentAuthor, an as CommentChange, ao as ContactChannel, ap as ContactError, aq as DashboardAiPlanRef, ar as DashboardPublicationRef, as as DashboardRange, at as EngagementBase, au as FileError, av as FileFormat, aw as FileProperties, ax as FileType, ay as IntegrationError, az as IntegrationErrorChange, aA as MessageChange, aB as MessageOptions, aC as MessageType, aD as MessagingError, aE as MetricRow, aF as NO_ERROR_CODE, aG as OpenApiComponents, aH as OpenApiOperations, aI as OpenApiPaths, aJ as OpenApiWebhooks, aK as OpenEnum, aL as OrganizationError, aM as PLANVORTEX_ERROR_RANGES, aN as PlanLimitError, aO as PlanVortexAuthenticationError, aP as PlanVortexConfigError, aQ as PlanVortexConnectionError, aR as PlanVortexError, aS as PlanVortexErrorOptions, aT as PlanVortexErrorRange, aU as ProductError, aV as PublicationError, aW as PublicationErrorDetail, aX as PublicationMetrics, aY as PublicationStatsPoint, aZ as PublicationType, a_ as PublicationsSummary, a$ as RssConfig, b0 as
|
|
1
|
+
import { P as Paginated, S as SocialNetwork, C as ConnectLink, a as ConnectResult, E as EnableResult, A as Account, b as AccountMetrics, c as PersistentMenu, d as Publication, e as AiPlanCreateRequest, f as AiPlanCreateResult, g as AiPlan, h as ClientApp, i as ClientAppInput, j as SocialCapabilities, k as CommentActions, l as SocialLimits, m as PublicationLimits, n as AspectRatiosByNetwork, o as CommentNetwork, p as Comment, q as CommentThread, r as CommentReplyResult, s as ContactExtraData, t as Contact, u as ContactCreate, v as ContactUpdate, D as Dashboard, M as MetricName, w as DashboardMetricsResult, x as PublicationsSummaryResult, T as TopPublicationsResult, y as PublicationsStatsResult, z as PlanUse, I as IntegrationProviderName, B as IntegrationProvider, F as Integration, G as IntegrationConnectRequest, H as IntegrationUpdate, J as IntegrationPickerConfig, K as MessageTemplate, L as Conversation, N as ConversationTotals, O as Message, Q as MessageInput, R as Client, U as Organization, V as AiSettings, W as ClientWithOrganizations, X as PlanData, Y as ConnectToken, Z as AiContext, _ as SocialCredentialsInput, $ as Product, a0 as ProductInput, a1 as ProductCatalog, a2 as ProductCatalogInput, a3 as PublicationInput, a4 as PublicationState, a5 as PublicationStats, a6 as PublicationStatsHistory, a7 as Upload } from './index-Bs_Usq51.js';
|
|
2
|
+
export { a8 as AccountError, a9 as AccountMetricRow, aa as AccountStateChange, ab as AccountWebhookChangeBase, ac as AccountWithError, ad as AiPlanCostEstimate, ae as AiPlanError, af as AiPlanOptions, ag as AiPlanOptionsInput, ah as AiPlanState, ai as ApiErrorBody, aj as AspectRatios, ak as AuthError, al as ClientPlan, am as CommentAuthor, an as CommentChange, ao as ContactChannel, ap as ContactError, aq as DashboardAiPlanRef, ar as DashboardPublicationRef, as as DashboardRange, at as EngagementBase, au as FileError, av as FileFormat, aw as FileProperties, ax as FileType, ay as IntegrationError, az as IntegrationErrorChange, aA as MessageChange, aB as MessageOptions, aC as MessageType, aD as MessagingError, aE as MetricRow, aF as NO_ERROR_CODE, aG as OpenApiComponents, aH as OpenApiOperations, aI as OpenApiPaths, aJ as OpenApiWebhooks, aK as OpenEnum, aL as OrganizationError, aM as PLANVORTEX_ERROR_RANGES, aN as PlanLimitError, aO as PlanVortexAuthenticationError, aP as PlanVortexConfigError, aQ as PlanVortexConnectionError, aR as PlanVortexError, aS as PlanVortexErrorOptions, aT as PlanVortexErrorRange, aU as ProductError, aV as PublicationError, aW as PublicationErrorDetail, aX as PublicationMetrics, aY as PublicationStatsPoint, aZ as PublicationType, a_ as PublicationsSummary, a$ as RssConfig, b0 as SocialAuthorizationMethod, b1 as SocialCredentials, b2 as SocialIdentifier, b3 as SocialIdentifierInput, b4 as SocialLimitsMap, b5 as TOKEN_ERROR_CODES, b6 as TopPublication, b7 as UnknownWebhookChange, b8 as UserError, b9 as WebhookAlgorithm, ba as WebhookChange, bb as WebhookEvent, bc as WithAccount, bd as WithPublication, be as account, bf as accountId, bg as errorFamilyForCode, bh as isPlanVortexError, bi as isTokenError, bj as messageContact, bk as messageContactId, bl as messageDirection, bm as messageFileIds, bn as messageFiles, bo as publication, bp as publicationId } from './index-Bs_Usq51.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Las dos constantes que todo lo demás necesita. Viven aparte de `index.ts` para que `client.ts`
|
|
@@ -15,7 +15,7 @@ declare const PLANVORTEX_API_URL = "https://api.planvortex.com/v1.0.0";
|
|
|
15
15
|
* de ejecución obliga a empaquetarlo y se rompe distinto en ESM y en CJS. La mantiene sincronizada
|
|
16
16
|
* un test.
|
|
17
17
|
*/
|
|
18
|
-
declare const VERSION = "0.
|
|
18
|
+
declare const VERSION = "0.2.0";
|
|
19
19
|
|
|
20
20
|
/** `fetch` con la firma que usamos. Se puede sustituir en tests o para meter un proxy. */
|
|
21
21
|
type FetchLike = (input: string, init: RequestInit) => Promise<Response>;
|
|
@@ -222,6 +222,12 @@ declare class AccountsResource extends Resource {
|
|
|
222
222
|
* no un fallo: es lo que pasa con Discord en una organización que todavía no ha guardado sus
|
|
223
223
|
* propias credenciales de bot.
|
|
224
224
|
*
|
|
225
|
+
* **MIRA `authorization`, NO si `link` está vacío.** Nueve de las diez redes son `redirect` y se
|
|
226
|
+
* manda a la persona a `link`. **WhatsApp no es una URL**: su alta es el Embedded Signup de
|
|
227
|
+
* Meta, un popup que levantas tú con el SDK de JavaScript de Facebook, así que su `link` es
|
|
228
|
+
* cadena vacía y lo que necesitas para abrirlo viaja en `authorization` — ver {@link ConnectLink}.
|
|
229
|
+
* Recorrer la lista redirigiendo a `link` manda a tu usuario a tu propia página.
|
|
230
|
+
*
|
|
225
231
|
* OJO: la red devuelve al usuario a un front de PlanVortex, no a una URL tuya — ver
|
|
226
232
|
* `redirect_uri` en {@link ConnectLinksOptions}.
|
|
227
233
|
*/
|
|
@@ -1336,7 +1342,15 @@ declare class OrganizationsResource extends Resource {
|
|
|
1336
1342
|
* - **`token`** — el credencial suelto, para `pv.asTemporalToken(token)` cuando la interfaz la
|
|
1337
1343
|
* pone el integrador.
|
|
1338
1344
|
*
|
|
1339
|
-
* Caduca en
|
|
1345
|
+
* Caduca en **quince minutos** y **sólo vale para esta organización**: usarlo contra otra
|
|
1346
|
+
* contesta 1101.
|
|
1347
|
+
*
|
|
1348
|
+
* **Y conecta una vez.** En cuanto un `accounts.connect` sale bien, ese token deja de poder
|
|
1349
|
+
* conectar y contesta 543; los `accounts.enable` que rematan esa misma conexión siguen valiendo
|
|
1350
|
+
* hasta que caduque. Emite uno por conexión: son gratis e inmediatos.
|
|
1351
|
+
*
|
|
1352
|
+
* **Si pasas `social_network`, el token queda atado a esa red** y no conecta ninguna otra (544).
|
|
1353
|
+
* Sin ella, el token abre cualquiera y es la persona quien elige.
|
|
1340
1354
|
*/
|
|
1341
1355
|
createConnectToken(idOrganization: string, options?: ConnectTokenOptions): Promise<ConnectToken>;
|
|
1342
1356
|
/**
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { createErrorFromResponse, NO_ERROR_CODE, PlanVortexConfigError, isTokenError, PlanVortexError, PlanVortexConnectionError, PlanVortexAuthenticationError, isPlanVortexError } from './chunk-
|
|
2
|
-
export { AccountError, AiPlanError, AuthError, ContactError, FileError, IntegrationError, MessagingError, NO_ERROR_CODE, OrganizationError, PLANVORTEX_ERROR_RANGES, PlanLimitError, PlanVortexAuthenticationError, PlanVortexConfigError, PlanVortexConnectionError, PlanVortexError, ProductError, PublicationError, TOKEN_ERROR_CODES, UserError, errorFamilyForCode, isPlanVortexError, isTokenError } from './chunk-
|
|
1
|
+
import { createErrorFromResponse, NO_ERROR_CODE, PlanVortexConfigError, isTokenError, PlanVortexError, PlanVortexConnectionError, PlanVortexAuthenticationError, isPlanVortexError } from './chunk-GUYS6XTO.js';
|
|
2
|
+
export { AccountError, AiPlanError, AuthError, ContactError, FileError, IntegrationError, MessagingError, NO_ERROR_CODE, OrganizationError, PLANVORTEX_ERROR_RANGES, PlanLimitError, PlanVortexAuthenticationError, PlanVortexConfigError, PlanVortexConnectionError, PlanVortexError, ProductError, PublicationError, TOKEN_ERROR_CODES, UserError, errorFamilyForCode, isPlanVortexError, isTokenError } from './chunk-GUYS6XTO.js';
|
|
3
3
|
import { basename } from 'path';
|
|
4
4
|
|
|
5
5
|
// src/version.ts
|
|
6
6
|
var PLANVORTEX_API_URL = "https://api.planvortex.com/v1.0.0";
|
|
7
|
-
var VERSION = "0.
|
|
7
|
+
var VERSION = "0.2.0";
|
|
8
8
|
|
|
9
9
|
// src/core/auth.ts
|
|
10
10
|
var TOKEN_REFRESH_MARGIN_MS = 6e4;
|
|
@@ -472,6 +472,12 @@ var AccountsResource = class extends Resource {
|
|
|
472
472
|
* no un fallo: es lo que pasa con Discord en una organización que todavía no ha guardado sus
|
|
473
473
|
* propias credenciales de bot.
|
|
474
474
|
*
|
|
475
|
+
* **MIRA `authorization`, NO si `link` está vacío.** Nueve de las diez redes son `redirect` y se
|
|
476
|
+
* manda a la persona a `link`. **WhatsApp no es una URL**: su alta es el Embedded Signup de
|
|
477
|
+
* Meta, un popup que levantas tú con el SDK de JavaScript de Facebook, así que su `link` es
|
|
478
|
+
* cadena vacía y lo que necesitas para abrirlo viaja en `authorization` — ver {@link ConnectLink}.
|
|
479
|
+
* Recorrer la lista redirigiendo a `link` manda a tu usuario a tu propia página.
|
|
480
|
+
*
|
|
475
481
|
* OJO: la red devuelve al usuario a un front de PlanVortex, no a una URL tuya — ver
|
|
476
482
|
* `redirect_uri` en {@link ConnectLinksOptions}.
|
|
477
483
|
*/
|
|
@@ -1870,7 +1876,15 @@ var OrganizationsResource = class extends Resource {
|
|
|
1870
1876
|
* - **`token`** — el credencial suelto, para `pv.asTemporalToken(token)` cuando la interfaz la
|
|
1871
1877
|
* pone el integrador.
|
|
1872
1878
|
*
|
|
1873
|
-
* Caduca en
|
|
1879
|
+
* Caduca en **quince minutos** y **sólo vale para esta organización**: usarlo contra otra
|
|
1880
|
+
* contesta 1101.
|
|
1881
|
+
*
|
|
1882
|
+
* **Y conecta una vez.** En cuanto un `accounts.connect` sale bien, ese token deja de poder
|
|
1883
|
+
* conectar y contesta 543; los `accounts.enable` que rematan esa misma conexión siguen valiendo
|
|
1884
|
+
* hasta que caduque. Emite uno por conexión: son gratis e inmediatos.
|
|
1885
|
+
*
|
|
1886
|
+
* **Si pasas `social_network`, el token queda atado a esa red** y no conecta ninguna otra (544).
|
|
1887
|
+
* Sin ella, el token abre cualquiera y es la persona quien elige.
|
|
1874
1888
|
*/
|
|
1875
1889
|
async createConnectToken(idOrganization, options = {}) {
|
|
1876
1890
|
return this.httpGet(
|