@carddb/client 0.4.2 → 0.4.5
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/index.cjs +67 -140
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +41 -61
- package/dist/index.d.ts +41 -61
- package/dist/index.js +67 -140
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _carddb_core from '@carddb/core';
|
|
2
|
-
import { Logger, LogLevel, Cache, ResourceType, CardDBConfig, RateLimitInfo, GraphQLErrorInfo, Collection, Publisher, Game, GameCreateInput, GameUpdateInput, GameScanRegion, Dataset, DatasetSchema, Deck, ViewerDecksFilterInput, AppDecksFilterInput, PublicDecksFilterInput, DeckVersion, DeckDiff, DeckValidateInput, DeckValidation, DeckHydrateEntriesInput, DeckHydrateEntriesPayload, DeckExportFormat, DeckExportPayload, DeckSectionDefinition, DeckCollaborator,
|
|
2
|
+
import { Logger, LogLevel, Cache, ResourceType, CardDBConfig, RateLimitInfo, GraphQLErrorInfo, Collection, Publisher, Game, GameCreateInput, GameUpdateInput, GameScanRegion, Dataset, DatasetSchema, Deck, DeckReadState, DeckPublishedVersionSelector, ViewerDecksFilterInput, AppDecksFilterInput, PublicDecksFilterInput, DeckVersion, DeckDiff, DeckValidateInput, DeckValidation, DeckHydrateEntriesInput, DeckHydrateEntriesPayload, DeckExportFormat, DeckExportPayload, DeckSectionDefinition, DeckCollaborator, DeckAPIApplicationAccess, DeckCreateInput, DeckUpdateInput, DeckUpsertByExternalRefInput, DeckUpsertByExternalRefPayload, DeckClaimInput, DeckOwnershipTransferPayload, DeckTransferOwnershipInput, DeckCopyInput, DeckCopyPayload, DeckEntryAddInput, DeckEntryMutationPayload, DeckEntryUpdateInput, DeckEntryReorderInput, DeckEntryReorderPayload, DeckEntriesReplaceInput, DeckEntriesReplacePayload, DeckImportInput, DeckImportPayload, DeckImportFormatDefinition, DeckImportFormatTestInput, DeckImportFormatTestPayload, DeckImportFormatCreateInput, DeckImportFormatUpdateInput, DeckPublishInput, DeckPublishPayload, DeckRemoveInvalidEntriesInput, DeckCollaboratorRole, DeckTokenIssuerCreateInput, DeckTokenIssuer, DeckAPIApplicationAccessGrantInput, DeckTokenExchangeInput, DeckTokenExchangePayload, HydrateDeckEntryInput, HydratedDeckEntry, FilterInput, DatasetRecord, DatasetRecordsUpsertInput, DatasetRecordsUpsertPayload, DatasetRecordsDeleteInput, DatasetRecordDeleteJob, DatasetRecordDeleteJobStatus, DatasetImportPreviewInput, DatasetImportPreviewResult, DatasetImportValidateInput, BulkImportResult, DatasetImportRunInput, ImportJob, ImportJobStatus, ImportLogLevel, ImportJobLog, GameImportPreviewInput, GameImportPreview, GameImportRunInput, GameImportJob, DatasetExportInput, ExportJob, ExportJobStatus, File, FileUploadInput, PresignedUpload, UploadPurpose, CreateScanUploadSessionInput, ConfirmScanUploadInput, CreateScanJobInput, ScanJobPayload, ScanJob, SubmitScanFeedbackInput, ScanFeedbackPayload, ScanMetricsInput, ScanMetrics, ResolveScanTemplateInput, ScanTemplateResolution, ScanTemplatesInput, ScanTemplate, SaveScanTemplateInput, ScanTemplatePayload, PreviewScanTemplateInput, ScanTemplatePreview, APIKeyInfo } from '@carddb/core';
|
|
3
3
|
export * from '@carddb/core';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -446,13 +446,17 @@ interface FetchDeckOptions {
|
|
|
446
446
|
/** Whether to use cache (defaults to client config) */
|
|
447
447
|
cache?: boolean;
|
|
448
448
|
}
|
|
449
|
+
interface DeckReadOptions extends FetchDeckOptions {
|
|
450
|
+
/** Explicitly choose mutable draft data or immutable published data. */
|
|
451
|
+
readState: DeckReadState;
|
|
452
|
+
/** Optional published version selector. Only valid with readState: 'PUBLISHED'. */
|
|
453
|
+
version?: DeckPublishedVersionSelector;
|
|
454
|
+
}
|
|
449
455
|
type FetchDeckByExternalRefOptions = FetchDeckOptions;
|
|
456
|
+
type DeckReadByExternalRefOptions = DeckReadOptions;
|
|
450
457
|
type FetchDeckBySlugOptions = FetchDeckOptions;
|
|
451
458
|
type ListDeckVersionsOptions = ListDecksOptions;
|
|
452
459
|
type ListDeckCollaboratorsOptions = FetchDeckOptions;
|
|
453
|
-
type ListDeckPreviewTokensOptions = FetchDeckOptions;
|
|
454
|
-
type ListDeckEmbedTokensOptions = FetchDeckOptions;
|
|
455
|
-
type ListDeckAccessTokenIssuersOptions = FetchDeckOptions;
|
|
456
460
|
interface ListDeckApiApplicationAccessesOptions extends FetchDeckOptions {
|
|
457
461
|
includeRevoked?: boolean;
|
|
458
462
|
}
|
|
@@ -490,7 +494,17 @@ declare class DecksResource extends BaseResource {
|
|
|
490
494
|
/**
|
|
491
495
|
* Fetch a deck by UUID using the ownership-aware `deck` API.
|
|
492
496
|
*/
|
|
493
|
-
get(id: string, options
|
|
497
|
+
get(id: string, options: DeckReadOptions): Promise<Deck | null>;
|
|
498
|
+
/**
|
|
499
|
+
* Fetch mutable draft data for a deck by UUID.
|
|
500
|
+
*/
|
|
501
|
+
getDraft(id: string, options?: FetchDeckOptions): Promise<Deck | null>;
|
|
502
|
+
/**
|
|
503
|
+
* Fetch immutable published data for a deck by UUID.
|
|
504
|
+
*/
|
|
505
|
+
getPublished(id: string, options?: FetchDeckOptions & {
|
|
506
|
+
version?: DeckPublishedVersionSelector;
|
|
507
|
+
}): Promise<Deck | null>;
|
|
494
508
|
/**
|
|
495
509
|
* Fetch one deck owned by the current account or API application.
|
|
496
510
|
*/
|
|
@@ -510,7 +524,17 @@ declare class DecksResource extends BaseResource {
|
|
|
510
524
|
/**
|
|
511
525
|
* Fetch by external reference using the ownership-aware `deckByExternalRef` API.
|
|
512
526
|
*/
|
|
513
|
-
getByExternalRef(externalRef: string, options
|
|
527
|
+
getByExternalRef(externalRef: string, options: DeckReadByExternalRefOptions): Promise<Deck | null>;
|
|
528
|
+
/**
|
|
529
|
+
* Fetch mutable draft data by API-application external reference.
|
|
530
|
+
*/
|
|
531
|
+
getDraftByExternalRef(externalRef: string, options?: FetchDeckOptions): Promise<Deck | null>;
|
|
532
|
+
/**
|
|
533
|
+
* Fetch immutable published data by API-application external reference.
|
|
534
|
+
*/
|
|
535
|
+
getPublishedByExternalRef(externalRef: string, options?: FetchDeckOptions & {
|
|
536
|
+
version?: DeckPublishedVersionSelector;
|
|
537
|
+
}): Promise<Deck | null>;
|
|
514
538
|
/**
|
|
515
539
|
* List decks owned by the current account or API application.
|
|
516
540
|
*/
|
|
@@ -535,18 +559,6 @@ declare class DecksResource extends BaseResource {
|
|
|
535
559
|
* List immutable published versions for a deck.
|
|
536
560
|
*/
|
|
537
561
|
listVersions(deckId: string, options?: ListDeckVersionsOptions): Promise<Collection<DeckVersion>>;
|
|
538
|
-
/**
|
|
539
|
-
* Fetch current draft data using a revocable preview token.
|
|
540
|
-
*/
|
|
541
|
-
preview(token: string, options?: FetchDeckOptions): Promise<Deck | null>;
|
|
542
|
-
/**
|
|
543
|
-
* Fetch published embed data using a revocable embed token.
|
|
544
|
-
*/
|
|
545
|
-
embed(token: string, options?: FetchDeckOptions): Promise<Deck | null>;
|
|
546
|
-
/**
|
|
547
|
-
* Fetch token-authorized published data using an exchanged access token.
|
|
548
|
-
*/
|
|
549
|
-
access(token: string, options?: FetchDeckOptions): Promise<Deck | null>;
|
|
550
562
|
/**
|
|
551
563
|
* Compare the current draft against the latest published version.
|
|
552
564
|
*/
|
|
@@ -575,18 +587,6 @@ declare class DecksResource extends BaseResource {
|
|
|
575
587
|
* List collaborators for a deck.
|
|
576
588
|
*/
|
|
577
589
|
listCollaborators(deckId: string, options?: ListDeckCollaboratorsOptions): Promise<DeckCollaborator[]>;
|
|
578
|
-
/**
|
|
579
|
-
* List draft preview tokens for a deck.
|
|
580
|
-
*/
|
|
581
|
-
listPreviewTokens(deckId: string, options?: ListDeckPreviewTokensOptions): Promise<DeckPreviewToken[]>;
|
|
582
|
-
/**
|
|
583
|
-
* List published embed tokens for a deck.
|
|
584
|
-
*/
|
|
585
|
-
listEmbedTokens(deckId: string, options?: ListDeckEmbedTokensOptions): Promise<DeckEmbedToken[]>;
|
|
586
|
-
/**
|
|
587
|
-
* List trusted access token issuers for a deck.
|
|
588
|
-
*/
|
|
589
|
-
listAccessTokenIssuers(deckId: string, options?: ListDeckAccessTokenIssuersOptions): Promise<DeckAccessTokenIssuer[]>;
|
|
590
590
|
/**
|
|
591
591
|
* List API applications with explicit access to one owned deck.
|
|
592
592
|
*/
|
|
@@ -708,33 +708,17 @@ declare class DecksResource extends BaseResource {
|
|
|
708
708
|
*/
|
|
709
709
|
removeCollaborator(deckId: string, accountId: string): Promise<boolean>;
|
|
710
710
|
/**
|
|
711
|
-
* Create a
|
|
712
|
-
*/
|
|
713
|
-
createPreviewToken(input: DeckPreviewTokenCreateInput): Promise<DeckPreviewTokenCreatePayload>;
|
|
714
|
-
/**
|
|
715
|
-
* Revoke a draft preview token.
|
|
711
|
+
* Create a unified deck token issuer for the current secret-key API application.
|
|
716
712
|
*/
|
|
717
|
-
|
|
713
|
+
createTokenIssuer(input: DeckTokenIssuerCreateInput): Promise<DeckTokenIssuer>;
|
|
718
714
|
/**
|
|
719
|
-
*
|
|
715
|
+
* Revoke a unified deck token issuer.
|
|
720
716
|
*/
|
|
721
|
-
|
|
717
|
+
revokeTokenIssuer(id: string): Promise<boolean>;
|
|
722
718
|
/**
|
|
723
|
-
* Revoke a
|
|
719
|
+
* Revoke only the direct signing key for a unified deck token issuer.
|
|
724
720
|
*/
|
|
725
|
-
|
|
726
|
-
/**
|
|
727
|
-
* Trust the current API application to exchange short-lived deck access tokens.
|
|
728
|
-
*/
|
|
729
|
-
createAccessTokenIssuer(input: DeckAccessTokenIssuerCreateInput): Promise<DeckAccessTokenIssuer>;
|
|
730
|
-
/**
|
|
731
|
-
* Revoke a trusted deck access token issuer.
|
|
732
|
-
*/
|
|
733
|
-
revokeAccessTokenIssuer(id: string): Promise<boolean>;
|
|
734
|
-
/**
|
|
735
|
-
* Revoke only the direct signing key for a trusted deck access token issuer.
|
|
736
|
-
*/
|
|
737
|
-
revokeAccessTokenIssuerSigningKey(id: string): Promise<DeckAccessTokenIssuer>;
|
|
721
|
+
revokeTokenIssuerSigningKey(id: string): Promise<DeckTokenIssuer>;
|
|
738
722
|
/**
|
|
739
723
|
* Grant or update one OAuth app's selected-deck access.
|
|
740
724
|
*/
|
|
@@ -744,17 +728,13 @@ declare class DecksResource extends BaseResource {
|
|
|
744
728
|
*/
|
|
745
729
|
revokeApiApplicationAccess(deckId: string, apiApplicationId: string): Promise<boolean>;
|
|
746
730
|
/**
|
|
747
|
-
* Exchange the current
|
|
748
|
-
*/
|
|
749
|
-
exchangeAccessToken(input: DeckAccessTokenExchangeInput): Promise<DeckAccessTokenExchangePayload>;
|
|
750
|
-
/**
|
|
751
|
-
* Exchange the current secret API application credential for an app-owned deck session token.
|
|
731
|
+
* Exchange the current secret API application credential for a unified deck token.
|
|
752
732
|
*/
|
|
753
|
-
|
|
733
|
+
exchangeToken(input: DeckTokenExchangeInput): Promise<DeckTokenExchangePayload>;
|
|
754
734
|
/**
|
|
755
|
-
* Revoke an exchanged deck
|
|
735
|
+
* Revoke an exchanged unified deck token.
|
|
756
736
|
*/
|
|
757
|
-
|
|
737
|
+
revokeToken(id: string): Promise<boolean>;
|
|
758
738
|
/**
|
|
759
739
|
* Hydrate third-party-owned deck entries without storing them in CardDB.
|
|
760
740
|
*/
|
|
@@ -1687,4 +1667,4 @@ declare function readCache<T>(cache: Cache, key: string): Promise<T | null>;
|
|
|
1687
1667
|
*/
|
|
1688
1668
|
declare function writeCache<T>(cache: Cache, key: string, value: T, ttl: number): Promise<void>;
|
|
1689
1669
|
|
|
1690
|
-
export { BaseResource, CardDBClient, Configuration, type ConfirmScanUploadOptions, Connection, type CreateScanJobOptions, type CreateScanUploadSessionOptions, DEFAULT_CACHE_TTL, DEFAULT_ENDPOINT, DEFAULT_MAX_NETWORK_RETRIES, DEFAULT_MAX_RETRIES, DEFAULT_OPEN_TIMEOUT, DEFAULT_RETRY_BASE_DELAY, DEFAULT_RETRY_MAX_DELAY, DEFAULT_TIMEOUT, DatasetsResource, type DeckSectionDefinitionsOptions, DecksResource, ExportsResource, type FetchDeckByExternalRefOptions, type FetchDeckBySlugOptions, type FetchDeckOptions, FilesResource, GamesResource, type GetDatasetByKeyOptions, type GetDatasetOptions, type GetFileOptions, type GetGameByKeyOptions, type GetGameBySlugOptions, type GetGameOptions, type GetGameRegionsOptions, type GetImportFormatByKeyOptions, type GetImportFormatOptions, type GetPublisherOptions, type GetRecordByDatasetIdentifierOptions, type GetRecordByIdentifierOptions, type GetRecordOptions, type GetRecordsByIdentifierOptions, type GetScanJobOptions, type GraphQLResponse, type HydrateDeckEntriesOptions, ImportFormatsResource, ImportsResource, type ListAppDecksOptions, type ListDatasetsOptions, type
|
|
1670
|
+
export { BaseResource, CardDBClient, Configuration, type ConfirmScanUploadOptions, Connection, type CreateScanJobOptions, type CreateScanUploadSessionOptions, DEFAULT_CACHE_TTL, DEFAULT_ENDPOINT, DEFAULT_MAX_NETWORK_RETRIES, DEFAULT_MAX_RETRIES, DEFAULT_OPEN_TIMEOUT, DEFAULT_RETRY_BASE_DELAY, DEFAULT_RETRY_MAX_DELAY, DEFAULT_TIMEOUT, DatasetsResource, type DeckReadByExternalRefOptions, type DeckReadOptions, type DeckSectionDefinitionsOptions, DecksResource, ExportsResource, type FetchDeckByExternalRefOptions, type FetchDeckBySlugOptions, type FetchDeckOptions, FilesResource, GamesResource, type GetDatasetByKeyOptions, type GetDatasetOptions, type GetFileOptions, type GetGameByKeyOptions, type GetGameBySlugOptions, type GetGameOptions, type GetGameRegionsOptions, type GetImportFormatByKeyOptions, type GetImportFormatOptions, type GetPublisherOptions, type GetRecordByDatasetIdentifierOptions, type GetRecordByIdentifierOptions, type GetRecordOptions, type GetRecordsByIdentifierOptions, type GetScanJobOptions, type GraphQLResponse, type HydrateDeckEntriesOptions, ImportFormatsResource, ImportsResource, type ListAppDecksOptions, type ListDatasetsOptions, type ListDeckApiApplicationAccessesOptions, type ListDeckCollaboratorsOptions, type ListDeckImportFormatsOptions, type ListDeckVersionsOptions, type ListDecksOptions, type ListExportJobsOptions, type ListFormatsOptions, type ListGameImportJobsOptions, type ListGamesOptions, type ListImportFormatsOptions, type ListImportJobLogsOptions, type ListImportJobsOptions, type ListMyDeckApiApplicationAccessesOptions, type ListPublicDecksOptions, type ListRecordDeleteJobsOptions, type ListRecordsOptions, type ListRuleDatasetsOptions, type ListRulesOptions, type ListScanTemplatesOptions, type ListViewerDecksOptions, type PollScanJobOptions, type PollSignal, type PreviewScanTemplateOptions, PublishersResource, RecordsResource, type ResolveScanTemplateOptions, RulesResource, type SaveScanTemplateOptions, type ScanMetricsOptions, ScanTemplatesResource, ScansResource, type SearchDatasetsOptions, type SearchGamesOptions, type SearchPublishersOptions, type SearchRecordsOptions, type UpdateScanTemplateOptions, type UploadFileInput, type VerifyWebhookSignatureInput, type WaitForExportJobOptions, type WaitForImportJobOptions, type WaitForRecordDeleteJobOptions, cacheKey, getRateLimitInfo, getSDKVersion, getUserAgent, readCache, writeCache };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _carddb_core from '@carddb/core';
|
|
2
|
-
import { Logger, LogLevel, Cache, ResourceType, CardDBConfig, RateLimitInfo, GraphQLErrorInfo, Collection, Publisher, Game, GameCreateInput, GameUpdateInput, GameScanRegion, Dataset, DatasetSchema, Deck, ViewerDecksFilterInput, AppDecksFilterInput, PublicDecksFilterInput, DeckVersion, DeckDiff, DeckValidateInput, DeckValidation, DeckHydrateEntriesInput, DeckHydrateEntriesPayload, DeckExportFormat, DeckExportPayload, DeckSectionDefinition, DeckCollaborator,
|
|
2
|
+
import { Logger, LogLevel, Cache, ResourceType, CardDBConfig, RateLimitInfo, GraphQLErrorInfo, Collection, Publisher, Game, GameCreateInput, GameUpdateInput, GameScanRegion, Dataset, DatasetSchema, Deck, DeckReadState, DeckPublishedVersionSelector, ViewerDecksFilterInput, AppDecksFilterInput, PublicDecksFilterInput, DeckVersion, DeckDiff, DeckValidateInput, DeckValidation, DeckHydrateEntriesInput, DeckHydrateEntriesPayload, DeckExportFormat, DeckExportPayload, DeckSectionDefinition, DeckCollaborator, DeckAPIApplicationAccess, DeckCreateInput, DeckUpdateInput, DeckUpsertByExternalRefInput, DeckUpsertByExternalRefPayload, DeckClaimInput, DeckOwnershipTransferPayload, DeckTransferOwnershipInput, DeckCopyInput, DeckCopyPayload, DeckEntryAddInput, DeckEntryMutationPayload, DeckEntryUpdateInput, DeckEntryReorderInput, DeckEntryReorderPayload, DeckEntriesReplaceInput, DeckEntriesReplacePayload, DeckImportInput, DeckImportPayload, DeckImportFormatDefinition, DeckImportFormatTestInput, DeckImportFormatTestPayload, DeckImportFormatCreateInput, DeckImportFormatUpdateInput, DeckPublishInput, DeckPublishPayload, DeckRemoveInvalidEntriesInput, DeckCollaboratorRole, DeckTokenIssuerCreateInput, DeckTokenIssuer, DeckAPIApplicationAccessGrantInput, DeckTokenExchangeInput, DeckTokenExchangePayload, HydrateDeckEntryInput, HydratedDeckEntry, FilterInput, DatasetRecord, DatasetRecordsUpsertInput, DatasetRecordsUpsertPayload, DatasetRecordsDeleteInput, DatasetRecordDeleteJob, DatasetRecordDeleteJobStatus, DatasetImportPreviewInput, DatasetImportPreviewResult, DatasetImportValidateInput, BulkImportResult, DatasetImportRunInput, ImportJob, ImportJobStatus, ImportLogLevel, ImportJobLog, GameImportPreviewInput, GameImportPreview, GameImportRunInput, GameImportJob, DatasetExportInput, ExportJob, ExportJobStatus, File, FileUploadInput, PresignedUpload, UploadPurpose, CreateScanUploadSessionInput, ConfirmScanUploadInput, CreateScanJobInput, ScanJobPayload, ScanJob, SubmitScanFeedbackInput, ScanFeedbackPayload, ScanMetricsInput, ScanMetrics, ResolveScanTemplateInput, ScanTemplateResolution, ScanTemplatesInput, ScanTemplate, SaveScanTemplateInput, ScanTemplatePayload, PreviewScanTemplateInput, ScanTemplatePreview, APIKeyInfo } from '@carddb/core';
|
|
3
3
|
export * from '@carddb/core';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -446,13 +446,17 @@ interface FetchDeckOptions {
|
|
|
446
446
|
/** Whether to use cache (defaults to client config) */
|
|
447
447
|
cache?: boolean;
|
|
448
448
|
}
|
|
449
|
+
interface DeckReadOptions extends FetchDeckOptions {
|
|
450
|
+
/** Explicitly choose mutable draft data or immutable published data. */
|
|
451
|
+
readState: DeckReadState;
|
|
452
|
+
/** Optional published version selector. Only valid with readState: 'PUBLISHED'. */
|
|
453
|
+
version?: DeckPublishedVersionSelector;
|
|
454
|
+
}
|
|
449
455
|
type FetchDeckByExternalRefOptions = FetchDeckOptions;
|
|
456
|
+
type DeckReadByExternalRefOptions = DeckReadOptions;
|
|
450
457
|
type FetchDeckBySlugOptions = FetchDeckOptions;
|
|
451
458
|
type ListDeckVersionsOptions = ListDecksOptions;
|
|
452
459
|
type ListDeckCollaboratorsOptions = FetchDeckOptions;
|
|
453
|
-
type ListDeckPreviewTokensOptions = FetchDeckOptions;
|
|
454
|
-
type ListDeckEmbedTokensOptions = FetchDeckOptions;
|
|
455
|
-
type ListDeckAccessTokenIssuersOptions = FetchDeckOptions;
|
|
456
460
|
interface ListDeckApiApplicationAccessesOptions extends FetchDeckOptions {
|
|
457
461
|
includeRevoked?: boolean;
|
|
458
462
|
}
|
|
@@ -490,7 +494,17 @@ declare class DecksResource extends BaseResource {
|
|
|
490
494
|
/**
|
|
491
495
|
* Fetch a deck by UUID using the ownership-aware `deck` API.
|
|
492
496
|
*/
|
|
493
|
-
get(id: string, options
|
|
497
|
+
get(id: string, options: DeckReadOptions): Promise<Deck | null>;
|
|
498
|
+
/**
|
|
499
|
+
* Fetch mutable draft data for a deck by UUID.
|
|
500
|
+
*/
|
|
501
|
+
getDraft(id: string, options?: FetchDeckOptions): Promise<Deck | null>;
|
|
502
|
+
/**
|
|
503
|
+
* Fetch immutable published data for a deck by UUID.
|
|
504
|
+
*/
|
|
505
|
+
getPublished(id: string, options?: FetchDeckOptions & {
|
|
506
|
+
version?: DeckPublishedVersionSelector;
|
|
507
|
+
}): Promise<Deck | null>;
|
|
494
508
|
/**
|
|
495
509
|
* Fetch one deck owned by the current account or API application.
|
|
496
510
|
*/
|
|
@@ -510,7 +524,17 @@ declare class DecksResource extends BaseResource {
|
|
|
510
524
|
/**
|
|
511
525
|
* Fetch by external reference using the ownership-aware `deckByExternalRef` API.
|
|
512
526
|
*/
|
|
513
|
-
getByExternalRef(externalRef: string, options
|
|
527
|
+
getByExternalRef(externalRef: string, options: DeckReadByExternalRefOptions): Promise<Deck | null>;
|
|
528
|
+
/**
|
|
529
|
+
* Fetch mutable draft data by API-application external reference.
|
|
530
|
+
*/
|
|
531
|
+
getDraftByExternalRef(externalRef: string, options?: FetchDeckOptions): Promise<Deck | null>;
|
|
532
|
+
/**
|
|
533
|
+
* Fetch immutable published data by API-application external reference.
|
|
534
|
+
*/
|
|
535
|
+
getPublishedByExternalRef(externalRef: string, options?: FetchDeckOptions & {
|
|
536
|
+
version?: DeckPublishedVersionSelector;
|
|
537
|
+
}): Promise<Deck | null>;
|
|
514
538
|
/**
|
|
515
539
|
* List decks owned by the current account or API application.
|
|
516
540
|
*/
|
|
@@ -535,18 +559,6 @@ declare class DecksResource extends BaseResource {
|
|
|
535
559
|
* List immutable published versions for a deck.
|
|
536
560
|
*/
|
|
537
561
|
listVersions(deckId: string, options?: ListDeckVersionsOptions): Promise<Collection<DeckVersion>>;
|
|
538
|
-
/**
|
|
539
|
-
* Fetch current draft data using a revocable preview token.
|
|
540
|
-
*/
|
|
541
|
-
preview(token: string, options?: FetchDeckOptions): Promise<Deck | null>;
|
|
542
|
-
/**
|
|
543
|
-
* Fetch published embed data using a revocable embed token.
|
|
544
|
-
*/
|
|
545
|
-
embed(token: string, options?: FetchDeckOptions): Promise<Deck | null>;
|
|
546
|
-
/**
|
|
547
|
-
* Fetch token-authorized published data using an exchanged access token.
|
|
548
|
-
*/
|
|
549
|
-
access(token: string, options?: FetchDeckOptions): Promise<Deck | null>;
|
|
550
562
|
/**
|
|
551
563
|
* Compare the current draft against the latest published version.
|
|
552
564
|
*/
|
|
@@ -575,18 +587,6 @@ declare class DecksResource extends BaseResource {
|
|
|
575
587
|
* List collaborators for a deck.
|
|
576
588
|
*/
|
|
577
589
|
listCollaborators(deckId: string, options?: ListDeckCollaboratorsOptions): Promise<DeckCollaborator[]>;
|
|
578
|
-
/**
|
|
579
|
-
* List draft preview tokens for a deck.
|
|
580
|
-
*/
|
|
581
|
-
listPreviewTokens(deckId: string, options?: ListDeckPreviewTokensOptions): Promise<DeckPreviewToken[]>;
|
|
582
|
-
/**
|
|
583
|
-
* List published embed tokens for a deck.
|
|
584
|
-
*/
|
|
585
|
-
listEmbedTokens(deckId: string, options?: ListDeckEmbedTokensOptions): Promise<DeckEmbedToken[]>;
|
|
586
|
-
/**
|
|
587
|
-
* List trusted access token issuers for a deck.
|
|
588
|
-
*/
|
|
589
|
-
listAccessTokenIssuers(deckId: string, options?: ListDeckAccessTokenIssuersOptions): Promise<DeckAccessTokenIssuer[]>;
|
|
590
590
|
/**
|
|
591
591
|
* List API applications with explicit access to one owned deck.
|
|
592
592
|
*/
|
|
@@ -708,33 +708,17 @@ declare class DecksResource extends BaseResource {
|
|
|
708
708
|
*/
|
|
709
709
|
removeCollaborator(deckId: string, accountId: string): Promise<boolean>;
|
|
710
710
|
/**
|
|
711
|
-
* Create a
|
|
712
|
-
*/
|
|
713
|
-
createPreviewToken(input: DeckPreviewTokenCreateInput): Promise<DeckPreviewTokenCreatePayload>;
|
|
714
|
-
/**
|
|
715
|
-
* Revoke a draft preview token.
|
|
711
|
+
* Create a unified deck token issuer for the current secret-key API application.
|
|
716
712
|
*/
|
|
717
|
-
|
|
713
|
+
createTokenIssuer(input: DeckTokenIssuerCreateInput): Promise<DeckTokenIssuer>;
|
|
718
714
|
/**
|
|
719
|
-
*
|
|
715
|
+
* Revoke a unified deck token issuer.
|
|
720
716
|
*/
|
|
721
|
-
|
|
717
|
+
revokeTokenIssuer(id: string): Promise<boolean>;
|
|
722
718
|
/**
|
|
723
|
-
* Revoke a
|
|
719
|
+
* Revoke only the direct signing key for a unified deck token issuer.
|
|
724
720
|
*/
|
|
725
|
-
|
|
726
|
-
/**
|
|
727
|
-
* Trust the current API application to exchange short-lived deck access tokens.
|
|
728
|
-
*/
|
|
729
|
-
createAccessTokenIssuer(input: DeckAccessTokenIssuerCreateInput): Promise<DeckAccessTokenIssuer>;
|
|
730
|
-
/**
|
|
731
|
-
* Revoke a trusted deck access token issuer.
|
|
732
|
-
*/
|
|
733
|
-
revokeAccessTokenIssuer(id: string): Promise<boolean>;
|
|
734
|
-
/**
|
|
735
|
-
* Revoke only the direct signing key for a trusted deck access token issuer.
|
|
736
|
-
*/
|
|
737
|
-
revokeAccessTokenIssuerSigningKey(id: string): Promise<DeckAccessTokenIssuer>;
|
|
721
|
+
revokeTokenIssuerSigningKey(id: string): Promise<DeckTokenIssuer>;
|
|
738
722
|
/**
|
|
739
723
|
* Grant or update one OAuth app's selected-deck access.
|
|
740
724
|
*/
|
|
@@ -744,17 +728,13 @@ declare class DecksResource extends BaseResource {
|
|
|
744
728
|
*/
|
|
745
729
|
revokeApiApplicationAccess(deckId: string, apiApplicationId: string): Promise<boolean>;
|
|
746
730
|
/**
|
|
747
|
-
* Exchange the current
|
|
748
|
-
*/
|
|
749
|
-
exchangeAccessToken(input: DeckAccessTokenExchangeInput): Promise<DeckAccessTokenExchangePayload>;
|
|
750
|
-
/**
|
|
751
|
-
* Exchange the current secret API application credential for an app-owned deck session token.
|
|
731
|
+
* Exchange the current secret API application credential for a unified deck token.
|
|
752
732
|
*/
|
|
753
|
-
|
|
733
|
+
exchangeToken(input: DeckTokenExchangeInput): Promise<DeckTokenExchangePayload>;
|
|
754
734
|
/**
|
|
755
|
-
* Revoke an exchanged deck
|
|
735
|
+
* Revoke an exchanged unified deck token.
|
|
756
736
|
*/
|
|
757
|
-
|
|
737
|
+
revokeToken(id: string): Promise<boolean>;
|
|
758
738
|
/**
|
|
759
739
|
* Hydrate third-party-owned deck entries without storing them in CardDB.
|
|
760
740
|
*/
|
|
@@ -1687,4 +1667,4 @@ declare function readCache<T>(cache: Cache, key: string): Promise<T | null>;
|
|
|
1687
1667
|
*/
|
|
1688
1668
|
declare function writeCache<T>(cache: Cache, key: string, value: T, ttl: number): Promise<void>;
|
|
1689
1669
|
|
|
1690
|
-
export { BaseResource, CardDBClient, Configuration, type ConfirmScanUploadOptions, Connection, type CreateScanJobOptions, type CreateScanUploadSessionOptions, DEFAULT_CACHE_TTL, DEFAULT_ENDPOINT, DEFAULT_MAX_NETWORK_RETRIES, DEFAULT_MAX_RETRIES, DEFAULT_OPEN_TIMEOUT, DEFAULT_RETRY_BASE_DELAY, DEFAULT_RETRY_MAX_DELAY, DEFAULT_TIMEOUT, DatasetsResource, type DeckSectionDefinitionsOptions, DecksResource, ExportsResource, type FetchDeckByExternalRefOptions, type FetchDeckBySlugOptions, type FetchDeckOptions, FilesResource, GamesResource, type GetDatasetByKeyOptions, type GetDatasetOptions, type GetFileOptions, type GetGameByKeyOptions, type GetGameBySlugOptions, type GetGameOptions, type GetGameRegionsOptions, type GetImportFormatByKeyOptions, type GetImportFormatOptions, type GetPublisherOptions, type GetRecordByDatasetIdentifierOptions, type GetRecordByIdentifierOptions, type GetRecordOptions, type GetRecordsByIdentifierOptions, type GetScanJobOptions, type GraphQLResponse, type HydrateDeckEntriesOptions, ImportFormatsResource, ImportsResource, type ListAppDecksOptions, type ListDatasetsOptions, type
|
|
1670
|
+
export { BaseResource, CardDBClient, Configuration, type ConfirmScanUploadOptions, Connection, type CreateScanJobOptions, type CreateScanUploadSessionOptions, DEFAULT_CACHE_TTL, DEFAULT_ENDPOINT, DEFAULT_MAX_NETWORK_RETRIES, DEFAULT_MAX_RETRIES, DEFAULT_OPEN_TIMEOUT, DEFAULT_RETRY_BASE_DELAY, DEFAULT_RETRY_MAX_DELAY, DEFAULT_TIMEOUT, DatasetsResource, type DeckReadByExternalRefOptions, type DeckReadOptions, type DeckSectionDefinitionsOptions, DecksResource, ExportsResource, type FetchDeckByExternalRefOptions, type FetchDeckBySlugOptions, type FetchDeckOptions, FilesResource, GamesResource, type GetDatasetByKeyOptions, type GetDatasetOptions, type GetFileOptions, type GetGameByKeyOptions, type GetGameBySlugOptions, type GetGameOptions, type GetGameRegionsOptions, type GetImportFormatByKeyOptions, type GetImportFormatOptions, type GetPublisherOptions, type GetRecordByDatasetIdentifierOptions, type GetRecordByIdentifierOptions, type GetRecordOptions, type GetRecordsByIdentifierOptions, type GetScanJobOptions, type GraphQLResponse, type HydrateDeckEntriesOptions, ImportFormatsResource, ImportsResource, type ListAppDecksOptions, type ListDatasetsOptions, type ListDeckApiApplicationAccessesOptions, type ListDeckCollaboratorsOptions, type ListDeckImportFormatsOptions, type ListDeckVersionsOptions, type ListDecksOptions, type ListExportJobsOptions, type ListFormatsOptions, type ListGameImportJobsOptions, type ListGamesOptions, type ListImportFormatsOptions, type ListImportJobLogsOptions, type ListImportJobsOptions, type ListMyDeckApiApplicationAccessesOptions, type ListPublicDecksOptions, type ListRecordDeleteJobsOptions, type ListRecordsOptions, type ListRuleDatasetsOptions, type ListRulesOptions, type ListScanTemplatesOptions, type ListViewerDecksOptions, type PollScanJobOptions, type PollSignal, type PreviewScanTemplateOptions, PublishersResource, RecordsResource, type ResolveScanTemplateOptions, RulesResource, type SaveScanTemplateOptions, type ScanMetricsOptions, ScanTemplatesResource, ScansResource, type SearchDatasetsOptions, type SearchGamesOptions, type SearchPublishersOptions, type SearchRecordsOptions, type UpdateScanTemplateOptions, type UploadFileInput, type VerifyWebhookSignatureInput, type WaitForExportJobOptions, type WaitForImportJobOptions, type WaitForRecordDeleteJobOptions, cacheKey, getRateLimitInfo, getSDKVersion, getUserAgent, readCache, writeCache };
|
package/dist/index.js
CHANGED
|
@@ -920,14 +920,27 @@ var DecksResource = class extends BaseResource {
|
|
|
920
920
|
/**
|
|
921
921
|
* Fetch a deck by UUID using the ownership-aware `deck` API.
|
|
922
922
|
*/
|
|
923
|
-
async get(id, options
|
|
924
|
-
const
|
|
923
|
+
async get(id, options) {
|
|
924
|
+
const variables = QueryBuilder.deckReadVariables(id, options.readState, options.version);
|
|
925
|
+
const key = this.cacheKey("decks", "get", variables);
|
|
925
926
|
return this.withCache(key, "decks", options, async () => {
|
|
926
927
|
const { query } = QueryBuilder.deckById();
|
|
927
|
-
const result = await this.connection.execute(query,
|
|
928
|
+
const result = await this.connection.execute(query, variables);
|
|
928
929
|
return result["deck"] ?? null;
|
|
929
930
|
});
|
|
930
931
|
}
|
|
932
|
+
/**
|
|
933
|
+
* Fetch mutable draft data for a deck by UUID.
|
|
934
|
+
*/
|
|
935
|
+
async getDraft(id, options = {}) {
|
|
936
|
+
return this.get(id, { ...options, readState: "DRAFT" });
|
|
937
|
+
}
|
|
938
|
+
/**
|
|
939
|
+
* Fetch immutable published data for a deck by UUID.
|
|
940
|
+
*/
|
|
941
|
+
async getPublished(id, options = {}) {
|
|
942
|
+
return this.get(id, { ...options, readState: "PUBLISHED", version: options.version });
|
|
943
|
+
}
|
|
931
944
|
/**
|
|
932
945
|
* Fetch one deck owned by the current account or API application.
|
|
933
946
|
*/
|
|
@@ -975,14 +988,35 @@ var DecksResource = class extends BaseResource {
|
|
|
975
988
|
/**
|
|
976
989
|
* Fetch by external reference using the ownership-aware `deckByExternalRef` API.
|
|
977
990
|
*/
|
|
978
|
-
async getByExternalRef(externalRef, options
|
|
979
|
-
const
|
|
991
|
+
async getByExternalRef(externalRef, options) {
|
|
992
|
+
const variables = QueryBuilder.deckExternalRefReadVariables(
|
|
993
|
+
externalRef,
|
|
994
|
+
options.readState,
|
|
995
|
+
options.version
|
|
996
|
+
);
|
|
997
|
+
const key = this.cacheKey("decks", "getByExternalRef", variables);
|
|
980
998
|
return this.withCache(key, "decks", options, async () => {
|
|
981
999
|
const { query } = QueryBuilder.deckByExternalRef();
|
|
982
|
-
const result = await this.connection.execute(query,
|
|
1000
|
+
const result = await this.connection.execute(query, variables);
|
|
983
1001
|
return result["deckByExternalRef"] ?? null;
|
|
984
1002
|
});
|
|
985
1003
|
}
|
|
1004
|
+
/**
|
|
1005
|
+
* Fetch mutable draft data by API-application external reference.
|
|
1006
|
+
*/
|
|
1007
|
+
async getDraftByExternalRef(externalRef, options = {}) {
|
|
1008
|
+
return this.getByExternalRef(externalRef, { ...options, readState: "DRAFT" });
|
|
1009
|
+
}
|
|
1010
|
+
/**
|
|
1011
|
+
* Fetch immutable published data by API-application external reference.
|
|
1012
|
+
*/
|
|
1013
|
+
async getPublishedByExternalRef(externalRef, options = {}) {
|
|
1014
|
+
return this.getByExternalRef(externalRef, {
|
|
1015
|
+
...options,
|
|
1016
|
+
readState: "PUBLISHED",
|
|
1017
|
+
version: options.version
|
|
1018
|
+
});
|
|
1019
|
+
}
|
|
986
1020
|
/**
|
|
987
1021
|
* List decks owned by the current account or API application.
|
|
988
1022
|
*/
|
|
@@ -1085,39 +1119,6 @@ var DecksResource = class extends BaseResource {
|
|
|
1085
1119
|
nextPageLoader: async (cursor) => this.listVersions(deckId, { ...options, after: cursor })
|
|
1086
1120
|
});
|
|
1087
1121
|
}
|
|
1088
|
-
/**
|
|
1089
|
-
* Fetch current draft data using a revocable preview token.
|
|
1090
|
-
*/
|
|
1091
|
-
async preview(token, options = {}) {
|
|
1092
|
-
const key = this.cacheKey("decks", "preview", { token });
|
|
1093
|
-
return this.withCache(key, "decks", options, async () => {
|
|
1094
|
-
const { query } = QueryBuilder.deckPreview();
|
|
1095
|
-
const result = await this.connection.execute(query, { token });
|
|
1096
|
-
return result["deckPreview"] ?? null;
|
|
1097
|
-
});
|
|
1098
|
-
}
|
|
1099
|
-
/**
|
|
1100
|
-
* Fetch published embed data using a revocable embed token.
|
|
1101
|
-
*/
|
|
1102
|
-
async embed(token, options = {}) {
|
|
1103
|
-
const key = this.cacheKey("decks", "embed", { token });
|
|
1104
|
-
return this.withCache(key, "decks", options, async () => {
|
|
1105
|
-
const { query } = QueryBuilder.deckEmbed();
|
|
1106
|
-
const result = await this.connection.execute(query, { token });
|
|
1107
|
-
return result["deckEmbed"] ?? null;
|
|
1108
|
-
});
|
|
1109
|
-
}
|
|
1110
|
-
/**
|
|
1111
|
-
* Fetch token-authorized published data using an exchanged access token.
|
|
1112
|
-
*/
|
|
1113
|
-
async access(token, options = {}) {
|
|
1114
|
-
const key = this.cacheKey("decks", "access", { token });
|
|
1115
|
-
return this.withCache(key, "decks", options, async () => {
|
|
1116
|
-
const { query } = QueryBuilder.deckAccess();
|
|
1117
|
-
const result = await this.connection.execute(query, { token });
|
|
1118
|
-
return result["deckAccess"] ?? null;
|
|
1119
|
-
});
|
|
1120
|
-
}
|
|
1121
1122
|
/**
|
|
1122
1123
|
* Compare the current draft against the latest published version.
|
|
1123
1124
|
*/
|
|
@@ -1205,39 +1206,6 @@ var DecksResource = class extends BaseResource {
|
|
|
1205
1206
|
return result["deckCollaborators"];
|
|
1206
1207
|
});
|
|
1207
1208
|
}
|
|
1208
|
-
/**
|
|
1209
|
-
* List draft preview tokens for a deck.
|
|
1210
|
-
*/
|
|
1211
|
-
async listPreviewTokens(deckId, options = {}) {
|
|
1212
|
-
const key = this.cacheKey("decks", "listPreviewTokens", { deckId });
|
|
1213
|
-
return this.withCache(key, "decks", options, async () => {
|
|
1214
|
-
const { query } = QueryBuilder.deckPreviewTokens();
|
|
1215
|
-
const result = await this.connection.execute(query, { deckId });
|
|
1216
|
-
return result["deckPreviewTokens"];
|
|
1217
|
-
});
|
|
1218
|
-
}
|
|
1219
|
-
/**
|
|
1220
|
-
* List published embed tokens for a deck.
|
|
1221
|
-
*/
|
|
1222
|
-
async listEmbedTokens(deckId, options = {}) {
|
|
1223
|
-
const key = this.cacheKey("decks", "listEmbedTokens", { deckId });
|
|
1224
|
-
return this.withCache(key, "decks", options, async () => {
|
|
1225
|
-
const { query } = QueryBuilder.deckEmbedTokens();
|
|
1226
|
-
const result = await this.connection.execute(query, { deckId });
|
|
1227
|
-
return result["deckEmbedTokens"];
|
|
1228
|
-
});
|
|
1229
|
-
}
|
|
1230
|
-
/**
|
|
1231
|
-
* List trusted access token issuers for a deck.
|
|
1232
|
-
*/
|
|
1233
|
-
async listAccessTokenIssuers(deckId, options = {}) {
|
|
1234
|
-
const key = this.cacheKey("decks", "listAccessTokenIssuers", { deckId });
|
|
1235
|
-
return this.withCache(key, "decks", options, async () => {
|
|
1236
|
-
const { query } = QueryBuilder.deckAccessTokenIssuers();
|
|
1237
|
-
const result = await this.connection.execute(query, { deckId });
|
|
1238
|
-
return result["deckAccessTokenIssuers"];
|
|
1239
|
-
});
|
|
1240
|
-
}
|
|
1241
1209
|
/**
|
|
1242
1210
|
* List API applications with explicit access to one owned deck.
|
|
1243
1211
|
*/
|
|
@@ -1522,63 +1490,32 @@ var DecksResource = class extends BaseResource {
|
|
|
1522
1490
|
return Boolean(result["deckCollaboratorRemove"]);
|
|
1523
1491
|
}
|
|
1524
1492
|
/**
|
|
1525
|
-
* Create a
|
|
1526
|
-
*/
|
|
1527
|
-
async createPreviewToken(input) {
|
|
1528
|
-
const { query } = QueryBuilder.createDeckPreviewToken();
|
|
1529
|
-
const variables = QueryBuilder.deckPreviewTokenCreateVariables(input);
|
|
1530
|
-
const result = await this.connection.execute(query, variables);
|
|
1531
|
-
return result["deckPreviewTokenCreate"];
|
|
1532
|
-
}
|
|
1533
|
-
/**
|
|
1534
|
-
* Revoke a draft preview token.
|
|
1535
|
-
*/
|
|
1536
|
-
async revokePreviewToken(id) {
|
|
1537
|
-
const { query } = QueryBuilder.revokeDeckPreviewToken();
|
|
1538
|
-
const result = await this.connection.execute(query, { id });
|
|
1539
|
-
return Boolean(result["deckPreviewTokenRevoke"]);
|
|
1540
|
-
}
|
|
1541
|
-
/**
|
|
1542
|
-
* Create a revocable published embed token.
|
|
1543
|
-
*/
|
|
1544
|
-
async createEmbedToken(input) {
|
|
1545
|
-
const { query } = QueryBuilder.createDeckEmbedToken();
|
|
1546
|
-
const variables = QueryBuilder.deckEmbedTokenCreateVariables(input);
|
|
1547
|
-
const result = await this.connection.execute(query, variables);
|
|
1548
|
-
return result["deckEmbedTokenCreate"];
|
|
1549
|
-
}
|
|
1550
|
-
/**
|
|
1551
|
-
* Revoke a published embed token.
|
|
1552
|
-
*/
|
|
1553
|
-
async revokeEmbedToken(id) {
|
|
1554
|
-
const { query } = QueryBuilder.revokeDeckEmbedToken();
|
|
1555
|
-
const result = await this.connection.execute(query, { id });
|
|
1556
|
-
return Boolean(result["deckEmbedTokenRevoke"]);
|
|
1557
|
-
}
|
|
1558
|
-
/**
|
|
1559
|
-
* Trust the current API application to exchange short-lived deck access tokens.
|
|
1493
|
+
* Create a unified deck token issuer for the current secret-key API application.
|
|
1560
1494
|
*/
|
|
1561
|
-
async
|
|
1562
|
-
|
|
1563
|
-
const
|
|
1495
|
+
async createTokenIssuer(input) {
|
|
1496
|
+
this.config.requireSecretCredential("decks.createTokenIssuer");
|
|
1497
|
+
const { query } = QueryBuilder.createDeckTokenIssuer();
|
|
1498
|
+
const variables = QueryBuilder.deckTokenIssuerCreateVariables(input);
|
|
1564
1499
|
const result = await this.connection.execute(query, variables);
|
|
1565
|
-
return result["
|
|
1500
|
+
return result["deckTokenIssuerCreate"];
|
|
1566
1501
|
}
|
|
1567
1502
|
/**
|
|
1568
|
-
* Revoke a
|
|
1503
|
+
* Revoke a unified deck token issuer.
|
|
1569
1504
|
*/
|
|
1570
|
-
async
|
|
1571
|
-
|
|
1505
|
+
async revokeTokenIssuer(id) {
|
|
1506
|
+
this.config.requireSecretCredential("decks.revokeTokenIssuer");
|
|
1507
|
+
const { query } = QueryBuilder.revokeDeckTokenIssuer();
|
|
1572
1508
|
const result = await this.connection.execute(query, { id });
|
|
1573
|
-
return Boolean(result["
|
|
1509
|
+
return Boolean(result["deckTokenIssuerRevoke"]);
|
|
1574
1510
|
}
|
|
1575
1511
|
/**
|
|
1576
|
-
* Revoke only the direct signing key for a
|
|
1512
|
+
* Revoke only the direct signing key for a unified deck token issuer.
|
|
1577
1513
|
*/
|
|
1578
|
-
async
|
|
1579
|
-
|
|
1514
|
+
async revokeTokenIssuerSigningKey(id) {
|
|
1515
|
+
this.config.requireSecretCredential("decks.revokeTokenIssuerSigningKey");
|
|
1516
|
+
const { query } = QueryBuilder.revokeDeckTokenIssuerSigningKey();
|
|
1580
1517
|
const result = await this.connection.execute(query, { id });
|
|
1581
|
-
return result["
|
|
1518
|
+
return result["deckTokenIssuerSigningKeyRevoke"];
|
|
1582
1519
|
}
|
|
1583
1520
|
/**
|
|
1584
1521
|
* Grant or update one OAuth app's selected-deck access.
|
|
@@ -1599,33 +1536,23 @@ var DecksResource = class extends BaseResource {
|
|
|
1599
1536
|
return Boolean(result["deckApiApplicationAccessRevoke"]);
|
|
1600
1537
|
}
|
|
1601
1538
|
/**
|
|
1602
|
-
* Exchange the current
|
|
1603
|
-
*/
|
|
1604
|
-
async exchangeAccessToken(input) {
|
|
1605
|
-
this.config.requireSecretCredential("decks.exchangeAccessToken");
|
|
1606
|
-
const { query } = QueryBuilder.exchangeDeckAccessToken();
|
|
1607
|
-
const variables = QueryBuilder.deckAccessTokenExchangeVariables(input);
|
|
1608
|
-
const result = await this.connection.execute(query, variables);
|
|
1609
|
-
return result["deckAccessTokenExchange"];
|
|
1610
|
-
}
|
|
1611
|
-
/**
|
|
1612
|
-
* Exchange the current secret API application credential for an app-owned deck session token.
|
|
1539
|
+
* Exchange the current secret API application credential for a unified deck token.
|
|
1613
1540
|
*/
|
|
1614
|
-
async
|
|
1615
|
-
this.config.requireSecretCredential("decks.
|
|
1616
|
-
const { query } = QueryBuilder.
|
|
1617
|
-
const variables = QueryBuilder.
|
|
1541
|
+
async exchangeToken(input) {
|
|
1542
|
+
this.config.requireSecretCredential("decks.exchangeToken");
|
|
1543
|
+
const { query } = QueryBuilder.exchangeDeckToken();
|
|
1544
|
+
const variables = QueryBuilder.deckTokenExchangeVariables(input);
|
|
1618
1545
|
const result = await this.connection.execute(query, variables);
|
|
1619
|
-
return result["
|
|
1546
|
+
return result["deckTokenExchange"];
|
|
1620
1547
|
}
|
|
1621
1548
|
/**
|
|
1622
|
-
* Revoke an exchanged deck
|
|
1549
|
+
* Revoke an exchanged unified deck token.
|
|
1623
1550
|
*/
|
|
1624
|
-
async
|
|
1625
|
-
this.config.requireSecretCredential("decks.
|
|
1626
|
-
const { query } = QueryBuilder.
|
|
1551
|
+
async revokeToken(id) {
|
|
1552
|
+
this.config.requireSecretCredential("decks.revokeToken");
|
|
1553
|
+
const { query } = QueryBuilder.revokeDeckToken();
|
|
1627
1554
|
const result = await this.connection.execute(query, { id });
|
|
1628
|
-
return Boolean(result["
|
|
1555
|
+
return Boolean(result["deckTokenRevoke"]);
|
|
1629
1556
|
}
|
|
1630
1557
|
/**
|
|
1631
1558
|
* Hydrate third-party-owned deck entries without storing them in CardDB.
|