@signa-so/sdk 0.15.0 → 0.17.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/README.md +19 -9
- package/dist/_internals/query-string.d.ts +16 -2
- package/dist/_internals/query-string.d.ts.map +1 -1
- package/dist/_internals/query-string.js +26 -6
- package/dist/_internals/query-string.js.map +1 -1
- package/dist/errors.d.ts +1 -2
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +2 -3
- package/dist/errors.js.map +1 -1
- package/dist/generated/api-types.d.ts +615 -181
- package/dist/generated/api-types.d.ts.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/pagination.d.ts +1 -3
- package/dist/pagination.d.ts.map +1 -1
- package/dist/pagination.js +1 -3
- package/dist/pagination.js.map +1 -1
- package/dist/presets.d.ts +23 -0
- package/dist/presets.d.ts.map +1 -0
- package/dist/presets.js +19 -0
- package/dist/presets.js.map +1 -0
- package/dist/resources/trademarks.d.ts +21 -15
- package/dist/resources/trademarks.d.ts.map +1 -1
- package/dist/resources/trademarks.js +100 -80
- package/dist/resources/trademarks.js.map +1 -1
- package/dist/resources/watches.d.ts +21 -3
- package/dist/resources/watches.d.ts.map +1 -1
- package/dist/resources/watches.js +21 -3
- package/dist/resources/watches.js.map +1 -1
- package/dist/types.d.ts +219 -168
- package/dist/types.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -3,9 +3,10 @@ export { Signa as default } from './client.js';
|
|
|
3
3
|
export { primaryOwnerName } from './resources/trademarks.js';
|
|
4
4
|
export { Analytics } from './resources/analytics.js';
|
|
5
5
|
export { categoryToNiceClasses, CATEGORY_NICE_TABLE } from './category-nice.js';
|
|
6
|
+
export { Presets } from './presets.js';
|
|
6
7
|
export { SignaError, SignaAPIError, BadRequestError, AuthenticationError, PermissionError, NotFoundError, ConflictError, GoneError, RateLimitError, InternalServerError, ConnectionError, TimeoutError, SignaTruncatedError, isExternalRefConflict, isResourceQuotaExceeded, } from './errors.js';
|
|
7
8
|
export { SignaList } from './pagination.js';
|
|
8
9
|
export { verifyWebhookSignature } from './webhooks.js';
|
|
9
10
|
export type { WebhookSignatureHeaders } from './webhooks.js';
|
|
10
|
-
export type { FeeRule, FeeSource, FeeEstimateLine, FeeEstimateParams, FeeEstimate, FeeListParams, FeeListResponse, Trademark, TrademarkSummary, TrademarkGrain, TrademarkEvent, Address, StatusCode, StatusCodeListParams, EventTypeListParams, TrademarkRelationship, TrademarkDocument, TrademarkDocumentSourceSync, Event, Owner, OwnerSummary, EntitySummary, EntityDetail, EntityMember, EntityMemberLink, EntityCompany, EntityListing, EntityListedAncestor, EntityFamily, EntityFamilyNode, Attorney, AttorneySummary, Firm, FirmSummary, Proceeding, ProceedingDetail, Citation, CitationTrademarkSummary, CitationDisposition, CitationActionStage, CitationRefusalType, Assignment, AssignmentDetail, TrademarkAssignment, TrademarkSearchResult, Classification, ClassificationDetail, AcceptedTerm, ClassificationSuggestionLite, ClassificationSuggestResult, GoodsServicesSuggestionClass, GoodsServicesSuggestResult, GoodsServicesTerm, GoodsServicesValidation, GoodsServicesValidationCandidate, GoodsServicesValidationSpan, GoodsServicesValidationTemplate, GoodsServicesValidationTemplateSlot, GoodsServicesValidationCoverage, CandidateSearch, CandidateSearchReason, GoodsServicesClassInference, GoodsServicesClassSource, WordingWarning, GoodsServicesValidationCatalogFreshness, GoodsServicesValidationSummaryCandidateSearch, GoodsServicesValidationSummaryWarningCount, GoodsServicesValidationResponse, ValidationItemStatus, OfficeVerdictStatus, Office, OfficeDetail, OfficeVote, OfficeVoteDeleted, CastOfficeVotesParams, OfficeAnalytics, MarketAnalytics, ClassificationAnalytics, AnalyticsReport, TrademarkAggregationName, TrademarkAggregationMode, Jurisdiction, JurisdictionDetail, DeadlineRule, ComputedDeadline, DeadlineComputation, DeadlineComputeItem, DeadlineComputeResult, DeadlineListParams, DeadlineListRow, DeadlineUnsupportedMark, UnsupportedDeadlineRule, DeadlineComputeResponse, DeadlineUnsupportedReason, DeadlineSupport, ProsecutionFact, ProsecutionMaintenanceFiling, ProsecutionDeadline, ProsecutionRuleIdentity, ProsecutionRuleSource, OppositionRule, OppositionCommonExtension, OppositionWindowSource, OppositionWindowComputation, OppositionComputeItem, OppositionComputeResponse, ReconcileFieldDiff, ReconcileYourFields, ReconcileItem, Reconciliation, ReconcileResponse, FieldVerdict, ReconcileVerdict, VerdictBasis, DocketedDeadline, ReconcileLookup, ReconcileComputedContext, ReconcileVerdictCounts, RuleSource, EventType, DesignCode, DesignCodeDetail, TrademarkProceeding, OwnerRelated, Portfolio, PortfolioResponse, PortfolioDetail, PortfolioMark, PortfolioMarkList, PortfolioMarksAddResult, PortfolioMarksRemoveResult, Feedback, FeedbackType, FeedbackStatus, FeedbackCreateParams, FeedbackListParams, Watch, WatchType, WatchStatus, WatchDeliveryMode, WatchTriggerEvent, WatchQuery, WatchPreviewResponse, WatchDiagnostics, WatchDiagnosticsLeaseState, WatchDiagnosticsWindowStatus, WatchAttestation, WatchAttestationOffice, WatchAttestationGap, Alert, AlertEventType, AlertSeverity, OppositionWindowStatus, HolidayAdjustment, Webhook, WebhookDisabledReason, WebhookEvent, WebhookEventType, WebhookStatus, WebhookDelivery, WebhookDeliveryStatus, WebhookTestResponse, WebhookRedeliveryResponse, AlertCreatedData, AlertCreatedPayload, AlertCreatedFlatFields, AlertCreatedEvent, EventPortfolioRef, TrademarkStatusChangedData, TrademarkStatusChangedEvent, OfficeActionIssuedData, OfficeActionIssuedDataV1, OfficeActionIssuedDataV2, OfficeActionIssuedEvent, OfficeActionIssuedOrgEventDetail, OrgEvent, OrgEventDetail, TrademarkOrgEventDetail, AlertCreatedOrgEventDetail, Identity, Usage, ApiKey, ApiKeyWithRawKey, RequestLog, RequestLogDetail, UsageSummaryResponse, UsageSummaryItem, UsageBillingPeriod, UsageEstimate, UsageEstimateAction, UsageEstimateUnmapped, UsageEstimatePlan, UsageEstimateOffer, UsageEstimatePacks, CreditBalance, CreditPrice, CreditPricingResponse, CreditGrantBreakdown, CreditExpiryScheduleEntry, DeletedResponse, SearchMeta, SearchWarning, APIErrorBody, ExternalRefConflictErrorBody, ResourceQuotaExceededErrorBody, QuotaScope,
|
|
11
|
+
export type { FeeRule, FeeSource, FeeEstimateLine, FeeEstimateParams, FeeEstimate, FeeListParams, FeeListResponse, Trademark, TrademarkSummary, TrademarkGrain, TrademarkEvent, Address, StatusCode, StatusCodeListParams, EventTypeListParams, TrademarkRelationship, TrademarkDocument, TrademarkDocumentSourceSync, Event, Owner, OwnerSummary, EntitySummary, EntityDetail, EntityMember, EntityMemberLink, EntityCompany, EntityListing, EntityListedAncestor, EntityFamily, EntityFamilyNode, Attorney, AttorneySummary, Firm, FirmSummary, Proceeding, ProceedingDetail, Citation, CitationTrademarkSummary, CitationDisposition, CitationActionStage, CitationRefusalType, Assignment, AssignmentDetail, TrademarkAssignment, TrademarkSearchResult, Classification, ClassificationDetail, AcceptedTerm, ClassificationSuggestionLite, ClassificationSuggestResult, GoodsServicesSuggestionClass, GoodsServicesSuggestResult, GoodsServicesTerm, GoodsServicesValidation, GoodsServicesValidationCandidate, GoodsServicesValidationSpan, GoodsServicesValidationTemplate, GoodsServicesValidationTemplateSlot, GoodsServicesValidationCoverage, CandidateSearch, CandidateSearchReason, GoodsServicesClassInference, GoodsServicesClassSource, WordingWarning, GoodsServicesValidationCatalogFreshness, GoodsServicesValidationSummaryCandidateSearch, GoodsServicesValidationSummaryWarningCount, GoodsServicesValidationResponse, ValidationItemStatus, OfficeVerdictStatus, Office, OfficeDetail, OfficeVote, OfficeVoteDeleted, CastOfficeVotesParams, OfficeAnalytics, MarketAnalytics, ClassificationAnalytics, AnalyticsReport, TrademarkAggregationName, TrademarkAggregationMode, Jurisdiction, JurisdictionDetail, DeadlineRule, ComputedDeadline, DeadlineComputation, DeadlineComputeItem, DeadlineComputeResult, DeadlineListParams, DeadlineListRow, DeadlineUnsupportedMark, UnsupportedDeadlineRule, DeadlineComputeResponse, DeadlineUnsupportedReason, DeadlineSupport, ProsecutionFact, ProsecutionMaintenanceFiling, ProsecutionDeadline, ProsecutionRuleIdentity, ProsecutionRuleSource, OppositionRule, OppositionCommonExtension, OppositionWindowSource, OppositionWindowComputation, OppositionComputeItem, OppositionComputeResponse, ReconcileFieldDiff, ReconcileYourFields, ReconcileItem, Reconciliation, ReconcileResponse, FieldVerdict, ReconcileVerdict, VerdictBasis, DocketedDeadline, ReconcileLookup, ReconcileComputedContext, ReconcileVerdictCounts, RuleSource, EventType, DesignCode, DesignCodeDetail, TrademarkProceeding, OwnerRelated, Portfolio, PortfolioResponse, PortfolioDetail, PortfolioMark, PortfolioMarkList, PortfolioMarksAddResult, PortfolioMarksRemoveResult, Feedback, FeedbackType, FeedbackStatus, FeedbackCreateParams, FeedbackListParams, Watch, WatchType, WatchStatus, WatchDeliveryMode, WatchTriggerEvent, WatchQuery, WatchPreviewResponse, WatchDiagnostics, WatchDiagnosticsLeaseState, WatchDiagnosticsWindowStatus, WatchAttestation, WatchAttestationOffice, WatchAttestationGap, Alert, AlertEventType, AlertSeverity, OppositionWindowStatus, HolidayAdjustment, Webhook, WebhookDisabledReason, WebhookEvent, WebhookEventType, WebhookStatus, WebhookDelivery, WebhookDeliveryStatus, WebhookTestResponse, WebhookRedeliveryResponse, AlertCreatedData, AlertCreatedPayload, AlertCreatedFlatFields, AlertCreatedEvent, EventPortfolioRef, TrademarkStatusChangedData, TrademarkStatusChangedEvent, OfficeActionIssuedData, OfficeActionIssuedDataV1, OfficeActionIssuedDataV2, OfficeActionIssuedEvent, OfficeActionIssuedOrgEventDetail, OrgEvent, OrgEventDetail, TrademarkOrgEventDetail, AlertCreatedOrgEventDetail, Identity, Usage, ApiKey, ApiKeyWithRawKey, RequestLog, RequestLogDetail, UsageSummaryResponse, UsageSummaryItem, UsageBillingPeriod, UsageEstimate, UsageEstimateAction, UsageEstimateUnmapped, UsageEstimatePlan, UsageEstimateOffer, UsageEstimatePacks, CreditBalance, CreditPrice, CreditPricingResponse, CreditGrantBreakdown, CreditExpiryScheduleEntry, DeletedResponse, SearchMeta, SearchWarning, APIErrorBody, ExternalRefConflictErrorBody, ResourceQuotaExceededErrorBody, QuotaScope, SimilarityChannel, MatchTier, TrademarkMatch, MarkTextFilters, MarkTextOperator, SearchExclude, SearchDeprecation, SearchTextParams, SearchTextList, OppositionStatus, SeniorityClaims, TrademarkSearchInclude, TrademarkDetailInclude, AttorneyStats, OwnerStats, TrademarkBatchBody, TrademarkBatchResponse, TrademarkSuggestion, AttorneyClient, TrademarkRetrieveParams, TrademarkListParams, TrademarkEventsParams, TrademarkSuggestParams, TrademarkProceedingsParams, TrademarkAssignmentsParams, TrademarkDocumentParams, TrademarkCitationsParams, TrademarkCitedByParams, OwnerRetrieveParams, OwnerListParams, OwnerTrademarksParams, OwnerRelatedParams, EntityRetrieveParams, EntityListParams, EntityTrademarksParams, EntityFamilyParams, AttorneyRetrieveParams, AttorneyListParams, AttorneyTrademarksParams, AttorneyClientsParams, FirmRetrieveParams, FirmListParams, FirmAttorneysParams, FirmTrademarksParams, ProceedingListParams, CitationListParams, ConveyanceType, AssignmentListParams, TrademarkSearchBody, SearchV2Body, ClassificationListParams, ClassificationSuggestParams, DesignCodeListParams, DeadlineComputeParams, OppositionComputeParams, ReconcileParams, GoodsServicesListParams, GoodsServicesSuggestParams, GoodsServicesValidateParams, GoodsServicesValidateItem, PortfolioCreateParams, PortfolioUpdateParams, PortfolioListParams, PortfolioRetrieveParams, PortfolioAddTrademarksBody, PortfolioAddTrademarkItem, PortfolioRemoveTrademarksBody, PortfolioDeadlineParams, PortfolioDeadlinesIcalParams, WatchCreateParams, WatchUpdateParams, WatchListParams, WatchReplayParams, WatchPreviewParams, WatchBulkParams, WatchDiagnosticsParams, WatchAttestationParams, AlertListParams, AlertLookupParams, WebhookCreateParams, WebhookUpdateParams, WebhookListParams, WebhookDeliveryListParams, OrgEventListParams, ApiKeyCreateParams, ApiKeyUpdateParams, LogListParams, UsageSummaryParams, UsageEstimateParams, ScreenParams, ScreenOptions, ScreenResult, ScreeningHit, ScreeningRiskLevel, ScreeningVerdict, ScreeningMarkMatchLevel, ScreeningGoodsServicesMatchLevel, ScreeningLitigationRiskLevel, CompareUseProfile, CompareCandidate, CompareConflict, CompareConflicts, CompareParams, CompareResult, ComparisonResult, ComparisonStatus, CompareRiskLevel, CompareMarkMatchLevel, CompareGoodsServicesLevel, ListingVerdict, ListingCheckParams, ListingCheckResult, ListingCandidate, ListingCandidateHit, SuppressedListingCandidate, RequestOptions, ClientOptions, } from './types.js';
|
|
11
12
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,KAAK,IAAI,OAAO,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,KAAK,IAAI,OAAO,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACh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BAAqB,EACrB,kBAAkB,EAClB,cAAc,EACd,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,EAClB,cAAc,EACd,oBAAoB,EAEpB,mBAAmB,EACnB,YAAY,EAEZ,wBAAwB,EACxB,2BAA2B,EAC3B,oBAAoB,EACpB,qBAAqB,EACrB,uBAAuB,EACvB,eAAe,EAEf,uBAAuB,EACvB,0BAA0B,EAC1B,2BAA2B,EAC3B,yBAAyB,EAEzB,qBAAqB,EACrB,qBAAqB,EACrB,mBAAmB,EACnB,uBAAuB,EACvB,0BAA0B,EAC1B,yBAAyB,EACzB,6BAA6B,EAC7B,uBAAuB,EACvB,4BAA4B,EAE5B,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,EACf,sBAAsB,EACtB,sBAAsB,EAEtB,eAAe,EACf,iBAAiB,EAEjB,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,yBAAyB,EAEzB,kBAAkB,EAElB,kBAAkB,EAClB,kBAAkB,EAClB,aAAa,EACb,kBAAkB,EAClB,mBAAmB,EAEnB,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,kBAAkB,EAClB,gBAAgB,EAChB,uBAAuB,EACvB,gCAAgC,EAChC,4BAA4B,EAE5B,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,qBAAqB,EACrB,yBAAyB,EAEzB,cAAc,EACd,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EAChB,mBAAmB,EACnB,0BAA0B,EAE1B,cAAc,EACd,aAAa,GACd,MAAM,YAAY,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -3,6 +3,7 @@ export { Signa as default } from './client.js';
|
|
|
3
3
|
export { primaryOwnerName } from './resources/trademarks.js';
|
|
4
4
|
export { Analytics } from './resources/analytics.js';
|
|
5
5
|
export { categoryToNiceClasses, CATEGORY_NICE_TABLE } from './category-nice.js';
|
|
6
|
+
export { Presets } from './presets.js';
|
|
6
7
|
// ── Error classes (for instanceof checks) ───────────────────────────
|
|
7
8
|
export { SignaError, SignaAPIError, BadRequestError, AuthenticationError, PermissionError, NotFoundError, ConflictError, GoneError, RateLimitError, InternalServerError, ConnectionError, TimeoutError, SignaTruncatedError, isExternalRefConflict, isResourceQuotaExceeded, } from './errors.js';
|
|
8
9
|
// ── Pagination ──────────────────────────────────────────────────────
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,KAAK,IAAI,OAAO,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,KAAK,IAAI,OAAO,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAChF,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,uEAAuE;AACvE,OAAO,EACL,UAAU,EACV,aAAa,EACb,eAAe,EACf,mBAAmB,EACnB,eAAe,EACf,aAAa,EACb,aAAa,EACb,SAAS,EACT,cAAc,EACd,mBAAmB,EACnB,eAAe,EACf,YAAY,EACZ,mBAAmB,EACnB,qBAAqB,EACrB,uBAAuB,GACxB,MAAM,aAAa,CAAC;AAErB,uEAAuE;AACvE,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,uEAAuE;AACvE,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC"}
|
package/dist/pagination.d.ts
CHANGED
|
@@ -84,9 +84,7 @@ export declare class SignaList<T> implements AsyncIterable<T> {
|
|
|
84
84
|
* match (a relevance-ranked or sorted trademark search): throws with
|
|
85
85
|
* `reason: 'server_window'` unless `limit` was already reached. The
|
|
86
86
|
* signal is the API's `result_window_reached` warning in the last page's
|
|
87
|
-
* `search_meta.warnings[]`; counts alone never trigger it.
|
|
88
|
-
* browse sorted by `family_updated_at` pages past the window and never
|
|
89
|
-
* carries it.
|
|
87
|
+
* `search_meta.warnings[]`; counts alone never trigger it.
|
|
90
88
|
*
|
|
91
89
|
* @param opts.limit Maximum items to collect.
|
|
92
90
|
*/
|
package/dist/pagination.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["../src/pagination.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,uBAAuB,EACvB,gBAAgB,EAChB,UAAU,EACV,2BAA2B,EAC5B,MAAM,YAAY,CAAC;AAIpB,KAAK,WAAW,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC;AAExE;;;;;;;;;GASG;AACH,qBAAa,SAAS,CAAC,CAAC,CAAE,YAAW,aAAa,CAAC,CAAC,CAAC;IACnD,iCAAiC;IACjC,QAAQ,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC;IAEnB,+CAA+C;IAC/C,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAA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C;IAepE;;;OAGG;IACG,WAAW,IAAI,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IAkB1C;;;;;;;;OAQG;IACI,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,aAAa,CAAC,CAAC,CAAC;IAYjD;;;;;;;;;;;;;;;OAeG;IACG,OAAO,CAAC,IAAI,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC;CAwBvD;AAKD;;;GAGG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAC1B,eAAe,EAAE,gBAAgB,CAAC,CAAC,CAAC,EACpC,SAAS,EAAE,WAAW,CAAC,CAAC,CAAC,GACxB,SAAS,CAAC,CAAC,CAAC,CAEd"}
|
package/dist/pagination.js
CHANGED
|
@@ -121,9 +121,7 @@ export class SignaList {
|
|
|
121
121
|
* match (a relevance-ranked or sorted trademark search): throws with
|
|
122
122
|
* `reason: 'server_window'` unless `limit` was already reached. The
|
|
123
123
|
* signal is the API's `result_window_reached` warning in the last page's
|
|
124
|
-
* `search_meta.warnings[]`; counts alone never trigger it.
|
|
125
|
-
* browse sorted by `family_updated_at` pages past the window and never
|
|
126
|
-
* carries it.
|
|
124
|
+
* `search_meta.warnings[]`; counts alone never trigger it.
|
|
127
125
|
*
|
|
128
126
|
* @param opts.limit Maximum items to collect.
|
|
129
127
|
*/
|
package/dist/pagination.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagination.js","sourceRoot":"","sources":["../src/pagination.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAQlD,MAAM,sBAAsB,GAAG,MAAM,CAAC;AAItC;;;;;;;;;GASG;AACH,MAAM,OAAO,SAAS;IACpB,iCAAiC;IACxB,IAAI,CAAM;IAEnB,+CAA+C;IACtC,QAAQ,CAAU;IAE3B,wCAAwC;IAC/B,UAAU,CAAS;IAE5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K,CAAC,CAAC;gBACvE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBACjB,IAAI,QAAQ,IAAI,KAAK,CAAC,MAAM,IAAI,KAAK;oBAAE,OAAO,KAAK,CAAC;YACtD,CAAC;YACD,IAAI,CAAC,IAAI,CAAC,QAAQ;gBAAE,MAAM;YAC1B,IAAI,GAAG,MAAM,IAAI,CAAC,WAAW,EAAE,CAAC;QAClC,CAAC;QAED,IAAI,IAAI,CAAC,WAAW,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,uBAAuB,CAAC,EAAE,CAAC;YAChF,MAAM,IAAI,mBAAmB,CAAC,KAAK,EAAE,oBAAoB,EAAE,eAAe,CAAC,CAAC;QAC9E,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;CACF;AAED,sFAAsF;AACtF,MAAM,oBAAoB,GAAG,MAAM,CAAC;AAEpC;;;GAGG;AACH,MAAM,UAAU,UAAU,CACxB,eAAoC,EACpC,SAAyB;IAEzB,OAAO,IAAI,SAAS,CAAI,eAAe,EAAE,SAAS,CAAC,CAAC;AACtD,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Similarity presets for a ranked `q`. Spread one into a search request:
|
|
3
|
+
*
|
|
4
|
+
* ```typescript
|
|
5
|
+
* import { Presets } from '@signa-so/sdk';
|
|
6
|
+
* await signa.trademarks.list({ q: 'limber', ...Presets.clearance });
|
|
7
|
+
* await signa.trademarks.search({ q: 'limber', ...Presets.knockout, filters: { offices: ['US'] } });
|
|
8
|
+
* ```
|
|
9
|
+
*
|
|
10
|
+
* `knockout`: identical, near-miss spellings and marks embedding the text; a
|
|
11
|
+
* fast first screen. `clearance`: adds sound-alike (`phonetic`) and
|
|
12
|
+
* look-alike characters (`lookalike`) for a full clearance search. Without a
|
|
13
|
+
* preset, `q` runs `identical`, `fuzzy`, `embedded` and `lookalike`.
|
|
14
|
+
*/
|
|
15
|
+
export declare const Presets: {
|
|
16
|
+
readonly knockout: {
|
|
17
|
+
readonly similarity: readonly ["identical", "fuzzy", "embedded"];
|
|
18
|
+
};
|
|
19
|
+
readonly clearance: {
|
|
20
|
+
readonly similarity: readonly ["identical", "fuzzy", "embedded", "phonetic", "lookalike"];
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=presets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presets.d.ts","sourceRoot":"","sources":["../src/presets.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,OAAO;;;;;;;CAGV,CAAC"}
|
package/dist/presets.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Similarity presets for a ranked `q`. Spread one into a search request:
|
|
3
|
+
*
|
|
4
|
+
* ```typescript
|
|
5
|
+
* import { Presets } from '@signa-so/sdk';
|
|
6
|
+
* await signa.trademarks.list({ q: 'limber', ...Presets.clearance });
|
|
7
|
+
* await signa.trademarks.search({ q: 'limber', ...Presets.knockout, filters: { offices: ['US'] } });
|
|
8
|
+
* ```
|
|
9
|
+
*
|
|
10
|
+
* `knockout`: identical, near-miss spellings and marks embedding the text; a
|
|
11
|
+
* fast first screen. `clearance`: adds sound-alike (`phonetic`) and
|
|
12
|
+
* look-alike characters (`lookalike`) for a full clearance search. Without a
|
|
13
|
+
* preset, `q` runs `identical`, `fuzzy`, `embedded` and `lookalike`.
|
|
14
|
+
*/
|
|
15
|
+
export const Presets = {
|
|
16
|
+
knockout: { similarity: ['identical', 'fuzzy', 'embedded'] },
|
|
17
|
+
clearance: { similarity: ['identical', 'fuzzy', 'embedded', 'phonetic', 'lookalike'] },
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=presets.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presets.js","sourceRoot":"","sources":["../src/presets.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,QAAQ,EAAE,EAAE,UAAU,EAAE,CAAC,WAAW,EAAE,OAAO,EAAE,UAAU,CAAC,EAAE;IAC5D,SAAS,EAAE,EAAE,UAAU,EAAE,CAAC,WAAW,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,CAAC,EAAE;CAC9E,CAAC"}
|
|
@@ -26,21 +26,28 @@ export declare class Trademarks extends BaseResource {
|
|
|
26
26
|
*/
|
|
27
27
|
retrieve(id: string, params?: TrademarkRetrieveParams, options?: RequestOptions): Promise<Trademark>;
|
|
28
28
|
/**
|
|
29
|
-
* List trademarks with filters via GET. At least one filter
|
|
30
|
-
* Returns a SignaList supporting
|
|
29
|
+
* List trademarks with filters via GET. At least one filter, `mark_text_*`
|
|
30
|
+
* operator or `q` is required. Returns a SignaList supporting
|
|
31
|
+
* auto-pagination.
|
|
31
32
|
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
33
|
+
* `q` ranks through the `similarity` channels; the `mark_text_*` filters
|
|
34
|
+
* decide which marks qualify; `mark_text_not_*` and `*_not` exclude. The
|
|
35
|
+
* `mark_text_*` and `*_not` lists go on the wire as repeated keys. When the
|
|
36
|
+
* query string would pass the API's 2 KB GET limit, the whole walk runs by
|
|
37
|
+
* POST (`trademarks.search()`), with the same criteria.
|
|
34
38
|
*
|
|
35
39
|
* ```typescript
|
|
36
40
|
* // Filter-only (sorted by -filing_date by default)
|
|
37
41
|
* const page = await signa.trademarks.list({ jurisdictions: ['US'], status_primary: 'active' });
|
|
38
42
|
*
|
|
39
|
-
* //
|
|
43
|
+
* // Ranked text search with filters (default channels)
|
|
40
44
|
* const results = await signa.trademarks.list({ q: 'SIGNA', jurisdictions: ['US'] });
|
|
41
45
|
*
|
|
42
|
-
* //
|
|
43
|
-
* const
|
|
46
|
+
* // Clearance channels, excluding your own marks
|
|
47
|
+
* const clear = await signa.trademarks.list({ q: 'SIGNA', ...Presets.clearance, owner_id_not: ['own_abc'] });
|
|
48
|
+
*
|
|
49
|
+
* // Several exact marks in one request (each hit carries match.terms)
|
|
50
|
+
* const variants = await signa.trademarks.list({ mark_text_is: ['limber', 'bimber'] });
|
|
44
51
|
*
|
|
45
52
|
* // Explicit sort
|
|
46
53
|
* const sorted = await signa.trademarks.list({ offices: ['US'], sort: '-registration_date' });
|
|
@@ -53,17 +60,16 @@ export declare class Trademarks extends BaseResource {
|
|
|
53
60
|
*/
|
|
54
61
|
list(params?: TrademarkListParams, options?: RequestOptions): Promise<SignaList<TrademarkSummary>>;
|
|
55
62
|
/**
|
|
56
|
-
* Search trademarks via POST with a JSON body. Use
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
* This replaces the old `signa.search.query()` method. The endpoint is
|
|
60
|
-
* `POST /v1/trademarks` (the old `/v1/trademarks/search` is deprecated).
|
|
63
|
+
* Search trademarks via POST with a JSON body (`POST /v1/trademarks`). Use
|
|
64
|
+
* this for structured filters, `mark_text` operators, exclusions and
|
|
65
|
+
* aggregations.
|
|
61
66
|
*
|
|
62
67
|
* ```typescript
|
|
63
68
|
* const results = await signa.trademarks.search({
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
* filters: { jurisdictions: ['US'], nice_classes: [9, 42] },
|
|
69
|
+
* q: 'SIGNA',
|
|
70
|
+
* ...Presets.clearance,
|
|
71
|
+
* filters: { jurisdictions: ['US'], nice_classes: [9, 42], mark_text: { starts_with: ['sig'] } },
|
|
72
|
+
* exclude: { owner_id: ['own_abc'], mark_text: { is: ['SIGNA'] } },
|
|
67
73
|
* options: { aggregations: ['status_stage', 'office_code'] },
|
|
68
74
|
* });
|
|
69
75
|
* console.log(results.aggregations);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trademarks.d.ts","sourceRoot":"","sources":["../../src/resources/trademarks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY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AAC,CAAC;IAU/B;;;;;;;;;;;;;OAaG;IACG,OAAO,CACX,EAAE,EAAE,MAAM,EACV,MAAM,CAAC,EAAE,sBAAsB,EAC/B,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;IAU/B,8CAA8C;IACxC,SAAS,CACb,EAAE,EAAE,MAAM,EACV,MAAM,CAAC,EAAE,uBAAuB,EAChC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAC;IAgBxC;;;;;;;;;;;;;;;;;OAiBG;IACH,KAAK,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM;CAK3C"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BaseResource } from '../resource.js';
|
|
2
2
|
import { createList } from '../pagination.js';
|
|
3
3
|
import { SignaError } from '../errors.js';
|
|
4
|
-
import { buildQueryString } from '../_internals/query-string.js';
|
|
4
|
+
import { buildQueryString, ID_EXCLUSION_KEYS, MARK_TEXT_OPERATORS, } from '../_internals/query-string.js';
|
|
5
5
|
export function primaryOwnerName(trademark) {
|
|
6
6
|
return trademark.owners?.[0]?.name ?? null;
|
|
7
7
|
}
|
|
@@ -31,21 +31,28 @@ export class Trademarks extends BaseResource {
|
|
|
31
31
|
}, options);
|
|
32
32
|
}
|
|
33
33
|
/**
|
|
34
|
-
* List trademarks with filters via GET. At least one filter
|
|
35
|
-
* Returns a SignaList supporting
|
|
34
|
+
* List trademarks with filters via GET. At least one filter, `mark_text_*`
|
|
35
|
+
* operator or `q` is required. Returns a SignaList supporting
|
|
36
|
+
* auto-pagination.
|
|
36
37
|
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
38
|
+
* `q` ranks through the `similarity` channels; the `mark_text_*` filters
|
|
39
|
+
* decide which marks qualify; `mark_text_not_*` and `*_not` exclude. The
|
|
40
|
+
* `mark_text_*` and `*_not` lists go on the wire as repeated keys. When the
|
|
41
|
+
* query string would pass the API's 2 KB GET limit, the whole walk runs by
|
|
42
|
+
* POST (`trademarks.search()`), with the same criteria.
|
|
39
43
|
*
|
|
40
44
|
* ```typescript
|
|
41
45
|
* // Filter-only (sorted by -filing_date by default)
|
|
42
46
|
* const page = await signa.trademarks.list({ jurisdictions: ['US'], status_primary: 'active' });
|
|
43
47
|
*
|
|
44
|
-
* //
|
|
48
|
+
* // Ranked text search with filters (default channels)
|
|
45
49
|
* const results = await signa.trademarks.list({ q: 'SIGNA', jurisdictions: ['US'] });
|
|
46
50
|
*
|
|
47
|
-
* //
|
|
48
|
-
* const
|
|
51
|
+
* // Clearance channels, excluding your own marks
|
|
52
|
+
* const clear = await signa.trademarks.list({ q: 'SIGNA', ...Presets.clearance, owner_id_not: ['own_abc'] });
|
|
53
|
+
*
|
|
54
|
+
* // Several exact marks in one request (each hit carries match.terms)
|
|
55
|
+
* const variants = await signa.trademarks.list({ mark_text_is: ['limber', 'bimber'] });
|
|
49
56
|
*
|
|
50
57
|
* // Explicit sort
|
|
51
58
|
* const sorted = await signa.trademarks.list({ offices: ['US'], sort: '-registration_date' });
|
|
@@ -57,26 +64,24 @@ export class Trademarks extends BaseResource {
|
|
|
57
64
|
* ```
|
|
58
65
|
*/
|
|
59
66
|
async list(params, options) {
|
|
60
|
-
//
|
|
61
|
-
//
|
|
62
|
-
const q =
|
|
63
|
-
|
|
64
|
-
const listParams = params && q !== params.q ? { ...params, q } : params;
|
|
65
|
-
// A list goes on the wire as a JSON array (q=["limber","bimber"]).
|
|
66
|
-
const wire = Array.isArray(q) ? { ...listParams, q: JSON.stringify(q) } : listParams;
|
|
67
|
+
// Deprecated wire alias for untyped callers (until 2026-12-28): a q list
|
|
68
|
+
// goes on the wire as a JSON array, which the API reads as mark_text_is.
|
|
69
|
+
const q = params?.q;
|
|
70
|
+
const wire = Array.isArray(q) ? { ...params, q: JSON.stringify(q) } : params;
|
|
67
71
|
// The API edge rejects a GET query string over 2 KB (403). The transport
|
|
68
72
|
// is chosen ONCE, on page 1, with an allowance for the cursor later pages
|
|
69
73
|
// carry: GET and POST bind cursors differently, so a walk never switches.
|
|
70
74
|
// Measured WITHOUT any cursor (post-fix QA #3): page 1, getNextPage() and
|
|
71
75
|
// a manual `list({ ...params, cursor })` of the same query must all pick
|
|
72
|
-
// the same transport, or the cursor is replayed on the other one.
|
|
76
|
+
// the same transport, or the cursor is replayed on the other one. The
|
|
77
|
+
// measurement is the real wire form, so every repeated key counts.
|
|
73
78
|
const { cursor: _cursor, ...cursorFree } = wire ?? {};
|
|
74
|
-
const usePost =
|
|
79
|
+
const usePost = params !== undefined &&
|
|
75
80
|
buildQueryString(cursorFree).length + CURSOR_ALLOWANCE > EDGE_MAX_QUERY_STRING;
|
|
76
81
|
const fetchPage = async (cursor) => {
|
|
77
82
|
const pageParams = { ...wire, cursor };
|
|
78
83
|
if (usePost) {
|
|
79
|
-
const body = { ...listParamsToSearchBody(
|
|
84
|
+
const body = { ...listParamsToSearchBody(params), ...(cursor !== undefined ? { cursor } : {}) };
|
|
80
85
|
assertBodyWithinEdgeLimit(body, { reserveCursor: true });
|
|
81
86
|
assertBodyWithinEdgeLimit(body);
|
|
82
87
|
return this._post('/v1/trademarks', body, options);
|
|
@@ -87,17 +92,16 @@ export class Trademarks extends BaseResource {
|
|
|
87
92
|
return createList(firstPage, fetchPage);
|
|
88
93
|
}
|
|
89
94
|
/**
|
|
90
|
-
* Search trademarks via POST with a JSON body. Use
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
* This replaces the old `signa.search.query()` method. The endpoint is
|
|
94
|
-
* `POST /v1/trademarks` (the old `/v1/trademarks/search` is deprecated).
|
|
95
|
+
* Search trademarks via POST with a JSON body (`POST /v1/trademarks`). Use
|
|
96
|
+
* this for structured filters, `mark_text` operators, exclusions and
|
|
97
|
+
* aggregations.
|
|
95
98
|
*
|
|
96
99
|
* ```typescript
|
|
97
100
|
* const results = await signa.trademarks.search({
|
|
98
|
-
*
|
|
99
|
-
*
|
|
100
|
-
* filters: { jurisdictions: ['US'], nice_classes: [9, 42] },
|
|
101
|
+
* q: 'SIGNA',
|
|
102
|
+
* ...Presets.clearance,
|
|
103
|
+
* filters: { jurisdictions: ['US'], nice_classes: [9, 42], mark_text: { starts_with: ['sig'] } },
|
|
104
|
+
* exclude: { owner_id: ['own_abc'], mark_text: { is: ['SIGNA'] } },
|
|
101
105
|
* options: { aggregations: ['status_stage', 'office_code'] },
|
|
102
106
|
* });
|
|
103
107
|
* console.log(results.aggregations);
|
|
@@ -112,8 +116,6 @@ export class Trademarks extends BaseResource {
|
|
|
112
116
|
* ```
|
|
113
117
|
*/
|
|
114
118
|
async search(params, options) {
|
|
115
|
-
assertTermList(params.q);
|
|
116
|
-
assertTermList(params.query);
|
|
117
119
|
const body = { ...params };
|
|
118
120
|
// Up front with room for the cursor later pages carry (a walk that fits
|
|
119
121
|
// page 1 but not page 2 fails before any request), then every body as sent.
|
|
@@ -324,34 +326,6 @@ export class Trademarks extends BaseResource {
|
|
|
324
326
|
return `${this._config.baseUrl}/v1/trademarks/${encodeURIComponent(id)}/media/${encodeURIComponent(mediaId)}`;
|
|
325
327
|
}
|
|
326
328
|
}
|
|
327
|
-
/**
|
|
328
|
-
* The API's GET rule: `q` is a list only when the whole value parses as a JSON
|
|
329
|
-
* array of strings; anything else (`[RE]BUILD`, `[1,2]`) is one literal term.
|
|
330
|
-
*/
|
|
331
|
-
function parseTermList(raw) {
|
|
332
|
-
if (!raw.trimStart().startsWith('['))
|
|
333
|
-
return undefined;
|
|
334
|
-
try {
|
|
335
|
-
const value = JSON.parse(raw);
|
|
336
|
-
return Array.isArray(value) && value.every((t) => typeof t === 'string') ? value : undefined;
|
|
337
|
-
}
|
|
338
|
-
catch {
|
|
339
|
-
return undefined;
|
|
340
|
-
}
|
|
341
|
-
}
|
|
342
|
-
/** Most terms one `q` list may carry (the API answers more with a 400). */
|
|
343
|
-
const MAX_TERMS = 100;
|
|
344
|
-
/** Fail before sending a `q` list the API would reject: empty, or over MAX_TERMS terms. */
|
|
345
|
-
function assertTermList(q) {
|
|
346
|
-
if (!Array.isArray(q))
|
|
347
|
-
return;
|
|
348
|
-
if (q.length === 0) {
|
|
349
|
-
throw new SignaError('A q list must contain at least one term.');
|
|
350
|
-
}
|
|
351
|
-
if (q.length > MAX_TERMS) {
|
|
352
|
-
throw new SignaError(`A q list accepts at most ${MAX_TERMS} terms per request (got ${q.length}). Split it into smaller batches.`);
|
|
353
|
-
}
|
|
354
|
-
}
|
|
355
329
|
/**
|
|
356
330
|
* Edge limits in front of the API: a GET query string over 2 KB is rejected
|
|
357
331
|
* (403) and a POST body over 8 KB is rejected (413). `list()` runs a walk by
|
|
@@ -374,25 +348,28 @@ function assertBodyWithinEdgeLimit(body, opts = {}) {
|
|
|
374
348
|
: new TextEncoder().encode(JSON.stringify(body)).length;
|
|
375
349
|
if (bytes > EDGE_MAX_BODY_BYTES) {
|
|
376
350
|
throw new SignaError(opts.reserveCursor
|
|
377
|
-
? `The search request body leaves no room for a pagination cursor within the API's ${EDGE_MAX_BODY_BYTES}-byte limit (${bytes} bytes including a ${CURSOR_ALLOWANCE}-byte cursor allowance). Split the
|
|
378
|
-
: `The search request body is ${bytes} bytes; the API accepts at most ${EDGE_MAX_BODY_BYTES}. Split the
|
|
351
|
+
? `The search request body leaves no room for a pagination cursor within the API's ${EDGE_MAX_BODY_BYTES}-byte limit (${bytes} bytes including a ${CURSOR_ALLOWANCE}-byte cursor allowance). Split the mark_text lists into smaller batches.`
|
|
352
|
+
: `The search request body is ${bytes} bytes; the API accepts at most ${EDGE_MAX_BODY_BYTES}. Split the mark_text lists into smaller batches.`);
|
|
379
353
|
}
|
|
380
354
|
}
|
|
381
|
-
/**
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
355
|
+
/**
|
|
356
|
+
* GET params that sit at the top level of the POST body under the same name.
|
|
357
|
+
* `strategies` and `match` are no longer typed (0.17.0) but pass through for
|
|
358
|
+
* untyped callers: the API accepts them on both transports until 2026-12-28.
|
|
359
|
+
*/
|
|
360
|
+
const TOP_LEVEL_KEYS = new Set([
|
|
361
|
+
'q',
|
|
362
|
+
'similarity',
|
|
363
|
+
'strategies',
|
|
364
|
+
'match',
|
|
365
|
+
'sort',
|
|
366
|
+
'limit',
|
|
367
|
+
'cursor',
|
|
368
|
+
'international_registrations',
|
|
369
|
+
'territory_match',
|
|
370
|
+
'include',
|
|
371
|
+
'fields',
|
|
372
|
+
]);
|
|
396
373
|
const OPTION_KEYS = new Set([
|
|
397
374
|
'aggregations',
|
|
398
375
|
'aggregation_mode',
|
|
@@ -400,7 +377,12 @@ const OPTION_KEYS = new Set([
|
|
|
400
377
|
'include_total',
|
|
401
378
|
'highlights',
|
|
402
379
|
'include_timing',
|
|
380
|
+
'allow_partial',
|
|
403
381
|
]);
|
|
382
|
+
/** GET `mark_text_<op>` → POST `filters.mark_text.<op>`; `mark_text_not_<op>` → `exclude.mark_text.<op>`. */
|
|
383
|
+
const MARK_TEXT_KEY = new RegExp(`^mark_text_(not_)?(${MARK_TEXT_OPERATORS.join('|')})$`);
|
|
384
|
+
/** GET `<key>_not` → POST `exclude.<key>`. */
|
|
385
|
+
const ID_EXCLUSION_KEY = new RegExp(`^(${ID_EXCLUSION_KEYS.join('|')})_not$`);
|
|
404
386
|
/** GET `<field>_{gte,gt,lte,lt}` → POST `filters.<field>.{gte,gt,lte,lt}`. */
|
|
405
387
|
const DATE_RANGE_FIELDS = new Set([
|
|
406
388
|
'filing_date',
|
|
@@ -414,7 +396,6 @@ const DATE_RANGE_FIELDS = new Set([
|
|
|
414
396
|
'first_use_in_commerce_date',
|
|
415
397
|
'termination_date',
|
|
416
398
|
'updated_at',
|
|
417
|
-
'family_updated_at',
|
|
418
399
|
]);
|
|
419
400
|
/** Filters that are arrays in the POST body (GET accepts a single value too). */
|
|
420
401
|
const ARRAY_FILTER_KEYS = new Set([
|
|
@@ -475,7 +456,7 @@ const REMOVED_PARAMS = {
|
|
|
475
456
|
opposition_closes_after: 'opposition_closes_gte',
|
|
476
457
|
};
|
|
477
458
|
/** GET list params that are comma lists (`offices=US,EM`) outside the filters. */
|
|
478
|
-
const TOP_LEVEL_LIST_KEYS = new Set(['strategies', 'include', 'fields']);
|
|
459
|
+
const TOP_LEVEL_LIST_KEYS = new Set(['similarity', 'strategies', 'include', 'fields']);
|
|
479
460
|
const OPTION_LIST_KEYS = new Set(['aggregations']);
|
|
480
461
|
/**
|
|
481
462
|
* A GET comma-list value as the POST array: GET joins arrays with commas and
|
|
@@ -489,6 +470,27 @@ function commaList(value) {
|
|
|
489
470
|
.filter((part) => part !== '')
|
|
490
471
|
: [item]);
|
|
491
472
|
}
|
|
473
|
+
/** A repeated-key GET value as the POST array: a scalar is one value, never split on commas. */
|
|
474
|
+
function repeatedList(value) {
|
|
475
|
+
const items = Array.isArray(value) ? value : [value];
|
|
476
|
+
return items.length > 0 ? items : undefined;
|
|
477
|
+
}
|
|
478
|
+
/**
|
|
479
|
+
* The API's GET rule for the deprecated q-list alias: `q` is a list only when
|
|
480
|
+
* the whole value parses as a JSON array of strings; anything else (`[RE]BUILD`,
|
|
481
|
+
* `[1,2]`) is one literal term.
|
|
482
|
+
*/
|
|
483
|
+
function parseTermList(raw) {
|
|
484
|
+
if (!raw.trimStart().startsWith('['))
|
|
485
|
+
return undefined;
|
|
486
|
+
try {
|
|
487
|
+
const value = JSON.parse(raw);
|
|
488
|
+
return Array.isArray(value) && value.every((t) => typeof t === 'string') ? value : undefined;
|
|
489
|
+
}
|
|
490
|
+
catch {
|
|
491
|
+
return undefined;
|
|
492
|
+
}
|
|
493
|
+
}
|
|
492
494
|
/**
|
|
493
495
|
* `list()` params as the equivalent `search()` body. A parameter with no POST
|
|
494
496
|
* equivalent throws instead of being dropped (a silently wider search).
|
|
@@ -497,13 +499,17 @@ function listParamsToSearchBody(params) {
|
|
|
497
499
|
const body = {};
|
|
498
500
|
const filters = {};
|
|
499
501
|
const opts = {};
|
|
502
|
+
const exclude = {};
|
|
503
|
+
const markText = {};
|
|
504
|
+
const excludeMarkText = {};
|
|
500
505
|
for (const [key, value] of Object.entries(params)) {
|
|
501
|
-
if (value === undefined)
|
|
506
|
+
if (value === undefined || value === null)
|
|
502
507
|
continue;
|
|
503
508
|
const range = /^(.+)_(gte|gt|lte|lt)$/.exec(key);
|
|
509
|
+
const markTextKey = MARK_TEXT_KEY.exec(key);
|
|
510
|
+
const idExclusion = ID_EXCLUSION_KEY.exec(key);
|
|
504
511
|
// GET omits an empty list (buildQueryString); so does the POST body — the
|
|
505
|
-
// API rejects e.g. `
|
|
506
|
-
// list() rejects it up front.)
|
|
512
|
+
// API rejects e.g. `similarity: []`.
|
|
507
513
|
const list = (v, map) => {
|
|
508
514
|
const items = map ? commaList(v).map(map) : commaList(v);
|
|
509
515
|
return items.length > 0 ? items : undefined;
|
|
@@ -512,8 +518,16 @@ function listParamsToSearchBody(params) {
|
|
|
512
518
|
if (v !== undefined)
|
|
513
519
|
target[k] = v;
|
|
514
520
|
};
|
|
515
|
-
|
|
516
|
-
|
|
521
|
+
// A q list (deprecated alias, untyped callers) stays a list: POST accepts it
|
|
522
|
+
// too. A string q the API's GET reads as a list goes by POST as that list.
|
|
523
|
+
if (key === 'q' && typeof value === 'string')
|
|
524
|
+
set(body, key, parseTermList(value) ?? value);
|
|
525
|
+
else if (TOP_LEVEL_KEYS.has(key))
|
|
526
|
+
set(body, key, TOP_LEVEL_LIST_KEYS.has(key) ? list(value) : value);
|
|
527
|
+
else if (markTextKey)
|
|
528
|
+
set(markTextKey[1] ? excludeMarkText : markText, markTextKey[2], repeatedList(value));
|
|
529
|
+
else if (idExclusion)
|
|
530
|
+
set(exclude, idExclusion[1], repeatedList(value));
|
|
517
531
|
else if (OPTION_KEYS.has(key))
|
|
518
532
|
set(opts, key, OPTION_LIST_KEYS.has(key) ? list(value) : value);
|
|
519
533
|
else if (range && DATE_RANGE_FIELDS.has(range[1])) {
|
|
@@ -532,8 +546,14 @@ function listParamsToSearchBody(params) {
|
|
|
532
546
|
throw new SignaError(`This request's query string exceeds the 2 KB GET limit, so it must be sent by POST, and \`${key}\` has no trademarks.search() equivalent. Call trademarks.search() directly, or shorten the request.`);
|
|
533
547
|
}
|
|
534
548
|
}
|
|
549
|
+
if (Object.keys(markText).length > 0)
|
|
550
|
+
filters.mark_text = markText;
|
|
551
|
+
if (Object.keys(excludeMarkText).length > 0)
|
|
552
|
+
exclude.mark_text = excludeMarkText;
|
|
535
553
|
if (Object.keys(filters).length > 0)
|
|
536
554
|
body.filters = filters;
|
|
555
|
+
if (Object.keys(exclude).length > 0)
|
|
556
|
+
body.exclude = exclude;
|
|
537
557
|
if (Object.keys(opts).length > 0)
|
|
538
558
|
body.options = opts;
|
|
539
559
|
return body;
|