@drawbridge/drawbridge-utils 0.0.115 → 0.0.116

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.
@@ -477,7 +477,13 @@ var attentive_default2 = {
477
477
  // connection DOCUMENT carries its own `errors` array and is spread OVER the
478
478
  // resolved manifest downstream, so a top-level one would never render.
479
479
  content: {
480
- confirm: "Disconnecting revokes Drawbridge's access to your Attentive account. Your subscribers stay in both Attentive and Drawbridge \u2014 neither list is deleted.",
480
+ // SAYS WHAT ACTUALLY HAPPENS. This used to promise that disconnecting
481
+ // revokes Drawbridge's access, and it cannot: Attentive documents no
482
+ // revocation endpoint, and their authentication page states an access
483
+ // token "does not expire". So the grant survives a disconnect forever
484
+ // unless the merchant removes the integration at Attentive, and the copy
485
+ // has to say so rather than let them believe otherwise.
486
+ confirm: "Disconnecting removes Drawbridge's stored Attentive token. Attentive does not offer a way for us to revoke it, so remove the Drawbridge integration in Attentive as well if you want its access fully withdrawn. Your subscribers stay in both Attentive and Drawbridge \u2014 neither list is deleted.",
481
487
  description: [
482
488
  "Attentive is where your SMS marketing lives, and this connection is becoming the way your Drawbridge contacts sync into an Attentive segment.",
483
489
  "You authorize Drawbridge from inside Attentive and can revoke that access there at any time. Drawbridge never sees or stores your Attentive password.",
@@ -518,8 +524,15 @@ var attentive_default2 = {
518
524
  // account-identity endpoint to enrich them with — Klaviyo's connect
519
525
  // reads the account name back; this has nothing cited to read. The
520
526
  // callback stores the tokens and skips enrichment on `unimplemented`.
521
- connect: {},
522
- disconnect: {},
527
+ // FALSE, NOT {}. `{}` means "supported, implemented in the repo with the
528
+ // dependencies", and nothing anywhere implements either of these —
529
+ // there is nothing for them to do. The exchange already yields the
530
+ // tokens and Attentive documents no account-identity endpoint to
531
+ // enrich them with, so connect has nothing to add; and they document
532
+ // no revocation endpoint at all, so disconnect has nothing to call.
533
+ // Recorded as a decision rather than left as an unkept promise.
534
+ connect: false,
535
+ disconnect: false,
523
536
  probe: false,
524
537
  scopes: false,
525
538
  // THE ONE THING WRAPPED, and it is about the response rather than the
@@ -2189,10 +2202,14 @@ var mailchimp_default2 = {
2189
2202
  // contacts.sync are the first to flip.
2190
2203
  hooks: {
2191
2204
  auth: {
2192
- // Implemented outside this package: storing a typed key needs no vendor
2193
- // call, so the api's own form handler does it.
2194
- connect: {},
2195
- disconnect: {},
2205
+ // FALSE, NOT {}. `{}` promises an implementation living in the repo that
2206
+ // holds the dependencies, and there is no implementation anywhere
2207
+ // because there is nothing to implement: storing and clearing a typed
2208
+ // key needs no vendor call, and the api's own form handler does it.
2209
+ // Declaring `{}` made the coverage check chase a body that does not
2210
+ // exist, and made a caller wait on an answer that never comes.
2211
+ connect: false,
2212
+ disconnect: false,
2196
2213
  probe: false,
2197
2214
  scopes: false,
2198
2215
  // Keys today. When Mailchimp's OAuth lands this becomes a wrapper that
@@ -2413,10 +2430,29 @@ var shopify_default2 = {
2413
2430
  // re-registers rather than answering "is this token still good", and
2414
2431
  // scope drift is its own hook because a token can be perfectly valid
2415
2432
  // while the grant is too narrow.
2416
- connect: {},
2417
- disconnect: {},
2433
+ //
2434
+ // connect and disconnect are FALSE rather than `{}`: there is nothing to
2435
+ // call on either side. The install already hands the callback everything
2436
+ // it stores, and a Shopify grant is withdrawn by UNINSTALLING the app in
2437
+ // Shopify admin — which Drawbridge learns about from the app_uninstalled
2438
+ // webhook rather than by asking. `{}` claimed a body implemented
2439
+ // elsewhere; none exists, and none could.
2440
+ connect: false,
2441
+ disconnect: false,
2418
2442
  probe: false,
2419
- scopes: {},
2443
+ // WHETHER THE GRANT IS STILL WIDE ENOUGH. A token can be perfectly valid
2444
+ // and still too narrow — a deploy that adds a scope leaves every existing
2445
+ // install short of it, and no webhook fires to say so.
2446
+ //
2447
+ // The comparison is the vendor's, so it belongs here. Reading WHICH
2448
+ // scopes a store granted is not: that lives in the `shop` collection and
2449
+ // needs a controller, which is precisely what a hook in a published
2450
+ // package must not be handed. The caller reads the grant and passes the
2451
+ // string; this answers what is missing from it.
2452
+ //
2453
+ // `shopify` is injected for the same reason it is everywhere else — this
2454
+ // package cannot import @drawbridge/shopify, which depends on it.
2455
+ scopes: ({ scope, shopify }) => scope ? shopify.oauth.missingScopes(scope) : null,
2420
2456
  // Shopify's install grant is exchanged inside its own app flow, not
2421
2457
  // through the shared OAuth runner.
2422
2458
  token: false
@@ -2879,10 +2915,12 @@ var webhook_default = {
2879
2915
  // connect generates a secret rather than proving a credential.
2880
2916
  hooks: {
2881
2917
  auth: {
2882
- // Minting and clearing a secret needs no vendor call, so the api's own
2883
- // handler does both.
2884
- connect: {},
2885
- disconnect: {},
2918
+ // FALSE, NOT {}. There is no vendor here at all connecting mints a
2919
+ // secret and disconnecting clears it, both done by the api's own
2920
+ // handler. `{}` would promise a body implemented elsewhere, and none
2921
+ // exists or could.
2922
+ connect: false,
2923
+ disconnect: false,
2886
2924
  probe: false,
2887
2925
  scopes: false,
2888
2926
  // Nothing to mint. Connecting generates a secret; there is no vendor.
@@ -603,7 +603,13 @@ var attentive = {
603
603
  // connection DOCUMENT carries its own `errors` array and is spread OVER the
604
604
  // resolved manifest downstream, so a top-level one would never render.
605
605
  content : {
606
- confirm : 'Disconnecting revokes Drawbridge\'s access to your Attentive account. Your subscribers stay in both Attentive and Drawbridge — neither list is deleted.',
606
+ // SAYS WHAT ACTUALLY HAPPENS. This used to promise that disconnecting
607
+ // revokes Drawbridge's access, and it cannot: Attentive documents no
608
+ // revocation endpoint, and their authentication page states an access
609
+ // token "does not expire". So the grant survives a disconnect forever
610
+ // unless the merchant removes the integration at Attentive, and the copy
611
+ // has to say so rather than let them believe otherwise.
612
+ confirm : 'Disconnecting removes Drawbridge\'s stored Attentive token. Attentive does not offer a way for us to revoke it, so remove the Drawbridge integration in Attentive as well if you want its access fully withdrawn. Your subscribers stay in both Attentive and Drawbridge — neither list is deleted.',
607
613
  description : [
608
614
  'Attentive is where your SMS marketing lives, and this connection is becoming the way your Drawbridge contacts sync into an Attentive segment.',
609
615
  'You authorize Drawbridge from inside Attentive and can revoke that access there at any time. Drawbridge never sees or stores your Attentive password.',
@@ -645,8 +651,15 @@ var attentive = {
645
651
  // account-identity endpoint to enrich them with — Klaviyo's connect
646
652
  // reads the account name back; this has nothing cited to read. The
647
653
  // callback stores the tokens and skips enrichment on `unimplemented`.
648
- connect : {},
649
- disconnect : {},
654
+ // FALSE, NOT {}. `{}` means "supported, implemented in the repo with the
655
+ // dependencies", and nothing anywhere implements either of these —
656
+ // there is nothing for them to do. The exchange already yields the
657
+ // tokens and Attentive documents no account-identity endpoint to
658
+ // enrich them with, so connect has nothing to add; and they document
659
+ // no revocation endpoint at all, so disconnect has nothing to call.
660
+ // Recorded as a decision rather than left as an unkept promise.
661
+ connect : false,
662
+ disconnect : false,
650
663
  probe : false,
651
664
  scopes : false,
652
665
  // THE ONE THING WRAPPED, and it is about the response rather than the
@@ -2018,10 +2031,14 @@ var mailchimp = {
2018
2031
  hooks : {
2019
2032
 
2020
2033
  auth : {
2021
- // Implemented outside this package: storing a typed key needs no vendor
2022
- // call, so the api's own form handler does it.
2023
- connect : {},
2024
- disconnect : {},
2034
+ // FALSE, NOT {}. `{}` promises an implementation living in the repo that
2035
+ // holds the dependencies, and there is no implementation anywhere
2036
+ // because there is nothing to implement: storing and clearing a typed
2037
+ // key needs no vendor call, and the api's own form handler does it.
2038
+ // Declaring `{}` made the coverage check chase a body that does not
2039
+ // exist, and made a caller wait on an answer that never comes.
2040
+ connect : false,
2041
+ disconnect : false,
2025
2042
  probe : false,
2026
2043
  scopes : false,
2027
2044
  // Keys today. When Mailchimp's OAuth lands this becomes a wrapper that
@@ -2322,10 +2339,30 @@ var shopify = {
2322
2339
  // re-registers rather than answering "is this token still good", and
2323
2340
  // scope drift is its own hook because a token can be perfectly valid
2324
2341
  // while the grant is too narrow.
2325
- connect : {},
2326
- disconnect : {},
2342
+ //
2343
+ // connect and disconnect are FALSE rather than `{}`: there is nothing to
2344
+ // call on either side. The install already hands the callback everything
2345
+ // it stores, and a Shopify grant is withdrawn by UNINSTALLING the app in
2346
+ // Shopify admin — which Drawbridge learns about from the app_uninstalled
2347
+ // webhook rather than by asking. `{}` claimed a body implemented
2348
+ // elsewhere; none exists, and none could.
2349
+ connect : false,
2350
+ disconnect : false,
2327
2351
  probe : false,
2328
- scopes : {},
2352
+
2353
+ // WHETHER THE GRANT IS STILL WIDE ENOUGH. A token can be perfectly valid
2354
+ // and still too narrow — a deploy that adds a scope leaves every existing
2355
+ // install short of it, and no webhook fires to say so.
2356
+ //
2357
+ // The comparison is the vendor's, so it belongs here. Reading WHICH
2358
+ // scopes a store granted is not: that lives in the `shop` collection and
2359
+ // needs a controller, which is precisely what a hook in a published
2360
+ // package must not be handed. The caller reads the grant and passes the
2361
+ // string; this answers what is missing from it.
2362
+ //
2363
+ // `shopify` is injected for the same reason it is everywhere else — this
2364
+ // package cannot import @drawbridge/shopify, which depends on it.
2365
+ scopes : ({ scope, shopify }) => ( scope ? shopify.oauth.missingScopes( scope ) : null ),
2329
2366
  // Shopify's install grant is exchanged inside its own app flow, not
2330
2367
  // through the shared OAuth runner.
2331
2368
  token : false
@@ -2683,10 +2720,12 @@ var webhook = {
2683
2720
  // connect generates a secret rather than proving a credential.
2684
2721
  hooks : {
2685
2722
  auth : {
2686
- // Minting and clearing a secret needs no vendor call, so the api's own
2687
- // handler does both.
2688
- connect : {},
2689
- disconnect : {},
2723
+ // FALSE, NOT {}. There is no vendor here at all connecting mints a
2724
+ // secret and disconnecting clears it, both done by the api's own
2725
+ // handler. `{}` would promise a body implemented elsewhere, and none
2726
+ // exists or could.
2727
+ connect : false,
2728
+ disconnect : false,
2690
2729
  probe : false,
2691
2730
  scopes : false,
2692
2731
  // Nothing to mint. Connecting generates a secret; there is no vendor.
@@ -603,7 +603,13 @@ var attentive = {
603
603
  // connection DOCUMENT carries its own `errors` array and is spread OVER the
604
604
  // resolved manifest downstream, so a top-level one would never render.
605
605
  content : {
606
- confirm : 'Disconnecting revokes Drawbridge\'s access to your Attentive account. Your subscribers stay in both Attentive and Drawbridge — neither list is deleted.',
606
+ // SAYS WHAT ACTUALLY HAPPENS. This used to promise that disconnecting
607
+ // revokes Drawbridge's access, and it cannot: Attentive documents no
608
+ // revocation endpoint, and their authentication page states an access
609
+ // token "does not expire". So the grant survives a disconnect forever
610
+ // unless the merchant removes the integration at Attentive, and the copy
611
+ // has to say so rather than let them believe otherwise.
612
+ confirm : 'Disconnecting removes Drawbridge\'s stored Attentive token. Attentive does not offer a way for us to revoke it, so remove the Drawbridge integration in Attentive as well if you want its access fully withdrawn. Your subscribers stay in both Attentive and Drawbridge — neither list is deleted.',
607
613
  description : [
608
614
  'Attentive is where your SMS marketing lives, and this connection is becoming the way your Drawbridge contacts sync into an Attentive segment.',
609
615
  'You authorize Drawbridge from inside Attentive and can revoke that access there at any time. Drawbridge never sees or stores your Attentive password.',
@@ -645,8 +651,15 @@ var attentive = {
645
651
  // account-identity endpoint to enrich them with — Klaviyo's connect
646
652
  // reads the account name back; this has nothing cited to read. The
647
653
  // callback stores the tokens and skips enrichment on `unimplemented`.
648
- connect : {},
649
- disconnect : {},
654
+ // FALSE, NOT {}. `{}` means "supported, implemented in the repo with the
655
+ // dependencies", and nothing anywhere implements either of these —
656
+ // there is nothing for them to do. The exchange already yields the
657
+ // tokens and Attentive documents no account-identity endpoint to
658
+ // enrich them with, so connect has nothing to add; and they document
659
+ // no revocation endpoint at all, so disconnect has nothing to call.
660
+ // Recorded as a decision rather than left as an unkept promise.
661
+ connect : false,
662
+ disconnect : false,
650
663
  probe : false,
651
664
  scopes : false,
652
665
  // THE ONE THING WRAPPED, and it is about the response rather than the
@@ -2018,10 +2031,14 @@ var mailchimp = {
2018
2031
  hooks : {
2019
2032
 
2020
2033
  auth : {
2021
- // Implemented outside this package: storing a typed key needs no vendor
2022
- // call, so the api's own form handler does it.
2023
- connect : {},
2024
- disconnect : {},
2034
+ // FALSE, NOT {}. `{}` promises an implementation living in the repo that
2035
+ // holds the dependencies, and there is no implementation anywhere
2036
+ // because there is nothing to implement: storing and clearing a typed
2037
+ // key needs no vendor call, and the api's own form handler does it.
2038
+ // Declaring `{}` made the coverage check chase a body that does not
2039
+ // exist, and made a caller wait on an answer that never comes.
2040
+ connect : false,
2041
+ disconnect : false,
2025
2042
  probe : false,
2026
2043
  scopes : false,
2027
2044
  // Keys today. When Mailchimp's OAuth lands this becomes a wrapper that
@@ -2322,10 +2339,30 @@ var shopify = {
2322
2339
  // re-registers rather than answering "is this token still good", and
2323
2340
  // scope drift is its own hook because a token can be perfectly valid
2324
2341
  // while the grant is too narrow.
2325
- connect : {},
2326
- disconnect : {},
2342
+ //
2343
+ // connect and disconnect are FALSE rather than `{}`: there is nothing to
2344
+ // call on either side. The install already hands the callback everything
2345
+ // it stores, and a Shopify grant is withdrawn by UNINSTALLING the app in
2346
+ // Shopify admin — which Drawbridge learns about from the app_uninstalled
2347
+ // webhook rather than by asking. `{}` claimed a body implemented
2348
+ // elsewhere; none exists, and none could.
2349
+ connect : false,
2350
+ disconnect : false,
2327
2351
  probe : false,
2328
- scopes : {},
2352
+
2353
+ // WHETHER THE GRANT IS STILL WIDE ENOUGH. A token can be perfectly valid
2354
+ // and still too narrow — a deploy that adds a scope leaves every existing
2355
+ // install short of it, and no webhook fires to say so.
2356
+ //
2357
+ // The comparison is the vendor's, so it belongs here. Reading WHICH
2358
+ // scopes a store granted is not: that lives in the `shop` collection and
2359
+ // needs a controller, which is precisely what a hook in a published
2360
+ // package must not be handed. The caller reads the grant and passes the
2361
+ // string; this answers what is missing from it.
2362
+ //
2363
+ // `shopify` is injected for the same reason it is everywhere else — this
2364
+ // package cannot import @drawbridge/shopify, which depends on it.
2365
+ scopes : ({ scope, shopify }) => ( scope ? shopify.oauth.missingScopes( scope ) : null ),
2329
2366
  // Shopify's install grant is exchanged inside its own app flow, not
2330
2367
  // through the shared OAuth runner.
2331
2368
  token : false
@@ -2683,10 +2720,12 @@ var webhook = {
2683
2720
  // connect generates a secret rather than proving a credential.
2684
2721
  hooks : {
2685
2722
  auth : {
2686
- // Minting and clearing a secret needs no vendor call, so the api's own
2687
- // handler does both.
2688
- connect : {},
2689
- disconnect : {},
2723
+ // FALSE, NOT {}. There is no vendor here at all connecting mints a
2724
+ // secret and disconnecting clears it, both done by the api's own
2725
+ // handler. `{}` would promise a body implemented elsewhere, and none
2726
+ // exists or could.
2727
+ connect : false,
2728
+ disconnect : false,
2690
2729
  probe : false,
2691
2730
  scopes : false,
2692
2731
  // Nothing to mint. Connecting generates a secret; there is no vendor.
@@ -408,7 +408,13 @@ var attentive_default2 = {
408
408
  // connection DOCUMENT carries its own `errors` array and is spread OVER the
409
409
  // resolved manifest downstream, so a top-level one would never render.
410
410
  content: {
411
- confirm: "Disconnecting revokes Drawbridge's access to your Attentive account. Your subscribers stay in both Attentive and Drawbridge \u2014 neither list is deleted.",
411
+ // SAYS WHAT ACTUALLY HAPPENS. This used to promise that disconnecting
412
+ // revokes Drawbridge's access, and it cannot: Attentive documents no
413
+ // revocation endpoint, and their authentication page states an access
414
+ // token "does not expire". So the grant survives a disconnect forever
415
+ // unless the merchant removes the integration at Attentive, and the copy
416
+ // has to say so rather than let them believe otherwise.
417
+ confirm: "Disconnecting removes Drawbridge's stored Attentive token. Attentive does not offer a way for us to revoke it, so remove the Drawbridge integration in Attentive as well if you want its access fully withdrawn. Your subscribers stay in both Attentive and Drawbridge \u2014 neither list is deleted.",
412
418
  description: [
413
419
  "Attentive is where your SMS marketing lives, and this connection is becoming the way your Drawbridge contacts sync into an Attentive segment.",
414
420
  "You authorize Drawbridge from inside Attentive and can revoke that access there at any time. Drawbridge never sees or stores your Attentive password.",
@@ -449,8 +455,15 @@ var attentive_default2 = {
449
455
  // account-identity endpoint to enrich them with — Klaviyo's connect
450
456
  // reads the account name back; this has nothing cited to read. The
451
457
  // callback stores the tokens and skips enrichment on `unimplemented`.
452
- connect: {},
453
- disconnect: {},
458
+ // FALSE, NOT {}. `{}` means "supported, implemented in the repo with the
459
+ // dependencies", and nothing anywhere implements either of these —
460
+ // there is nothing for them to do. The exchange already yields the
461
+ // tokens and Attentive documents no account-identity endpoint to
462
+ // enrich them with, so connect has nothing to add; and they document
463
+ // no revocation endpoint at all, so disconnect has nothing to call.
464
+ // Recorded as a decision rather than left as an unkept promise.
465
+ connect: false,
466
+ disconnect: false,
454
467
  probe: false,
455
468
  scopes: false,
456
469
  // THE ONE THING WRAPPED, and it is about the response rather than the
@@ -2120,10 +2133,14 @@ var mailchimp_default2 = {
2120
2133
  // contacts.sync are the first to flip.
2121
2134
  hooks: {
2122
2135
  auth: {
2123
- // Implemented outside this package: storing a typed key needs no vendor
2124
- // call, so the api's own form handler does it.
2125
- connect: {},
2126
- disconnect: {},
2136
+ // FALSE, NOT {}. `{}` promises an implementation living in the repo that
2137
+ // holds the dependencies, and there is no implementation anywhere
2138
+ // because there is nothing to implement: storing and clearing a typed
2139
+ // key needs no vendor call, and the api's own form handler does it.
2140
+ // Declaring `{}` made the coverage check chase a body that does not
2141
+ // exist, and made a caller wait on an answer that never comes.
2142
+ connect: false,
2143
+ disconnect: false,
2127
2144
  probe: false,
2128
2145
  scopes: false,
2129
2146
  // Keys today. When Mailchimp's OAuth lands this becomes a wrapper that
@@ -2344,10 +2361,29 @@ var shopify_default2 = {
2344
2361
  // re-registers rather than answering "is this token still good", and
2345
2362
  // scope drift is its own hook because a token can be perfectly valid
2346
2363
  // while the grant is too narrow.
2347
- connect: {},
2348
- disconnect: {},
2364
+ //
2365
+ // connect and disconnect are FALSE rather than `{}`: there is nothing to
2366
+ // call on either side. The install already hands the callback everything
2367
+ // it stores, and a Shopify grant is withdrawn by UNINSTALLING the app in
2368
+ // Shopify admin — which Drawbridge learns about from the app_uninstalled
2369
+ // webhook rather than by asking. `{}` claimed a body implemented
2370
+ // elsewhere; none exists, and none could.
2371
+ connect: false,
2372
+ disconnect: false,
2349
2373
  probe: false,
2350
- scopes: {},
2374
+ // WHETHER THE GRANT IS STILL WIDE ENOUGH. A token can be perfectly valid
2375
+ // and still too narrow — a deploy that adds a scope leaves every existing
2376
+ // install short of it, and no webhook fires to say so.
2377
+ //
2378
+ // The comparison is the vendor's, so it belongs here. Reading WHICH
2379
+ // scopes a store granted is not: that lives in the `shop` collection and
2380
+ // needs a controller, which is precisely what a hook in a published
2381
+ // package must not be handed. The caller reads the grant and passes the
2382
+ // string; this answers what is missing from it.
2383
+ //
2384
+ // `shopify` is injected for the same reason it is everywhere else — this
2385
+ // package cannot import @drawbridge/shopify, which depends on it.
2386
+ scopes: ({ scope, shopify }) => scope ? shopify.oauth.missingScopes(scope) : null,
2351
2387
  // Shopify's install grant is exchanged inside its own app flow, not
2352
2388
  // through the shared OAuth runner.
2353
2389
  token: false
@@ -2810,10 +2846,12 @@ var webhook_default = {
2810
2846
  // connect generates a secret rather than proving a credential.
2811
2847
  hooks: {
2812
2848
  auth: {
2813
- // Minting and clearing a secret needs no vendor call, so the api's own
2814
- // handler does both.
2815
- connect: {},
2816
- disconnect: {},
2849
+ // FALSE, NOT {}. There is no vendor here at all connecting mints a
2850
+ // secret and disconnecting clears it, both done by the api's own
2851
+ // handler. `{}` would promise a body implemented elsewhere, and none
2852
+ // exists or could.
2853
+ connect: false,
2854
+ disconnect: false,
2817
2855
  probe: false,
2818
2856
  scopes: false,
2819
2857
  // Nothing to mint. Connecting generates a secret; there is no vendor.
package/package.json CHANGED
@@ -210,5 +210,5 @@
210
210
  "test": ". \"$HOME/.nvm/nvm.sh\" && nvm use && node --test"
211
211
  },
212
212
  "types": "dist/index.d.ts",
213
- "version": "0.0.115"
213
+ "version": "0.0.116"
214
214
  }