shopify_draft_proxy/state/store
Mirrors the slices of src/state/store.ts that have been ported to
Gleam plus the mutation log. Additional resources still land
slice-by-slice with their domain handlers.
The TS class mutates state in place. This Gleam port returns updated
Store records from every mutator so callers thread state through
their own pipeline (matching the pattern already established for
SyntheticIdentityRegistry).
Types
Server-authoritative state. Mirrors the ported slices of StateSnapshot
for baseState. Other resources land slice-by-slice as their domain
handlers port.
pub type BaseState {
BaseState(
products: dict.Dict(String, types.ProductRecord),
product_order: List(String),
deleted_product_ids: dict.Dict(String, Bool),
product_count: option.Option(Int),
product_variants: dict.Dict(
String,
types.ProductVariantRecord,
),
product_variant_order: List(String),
product_variant_count: option.Option(Int),
product_options: dict.Dict(String, types.ProductOptionRecord),
product_operations: dict.Dict(
String,
types.ProductOperationRecord,
),
selling_plan_groups: dict.Dict(
String,
types.SellingPlanGroupRecord,
),
selling_plan_group_order: List(String),
deleted_selling_plan_group_ids: dict.Dict(String, Bool),
markets: dict.Dict(String, types.MarketRecord),
market_order: List(String),
deleted_market_ids: dict.Dict(String, Bool),
catalogs: dict.Dict(String, types.CatalogRecord),
catalog_order: List(String),
deleted_catalog_ids: dict.Dict(String, Bool),
price_lists: dict.Dict(String, types.PriceListRecord),
price_list_order: List(String),
deleted_price_list_ids: dict.Dict(String, Bool),
web_presences: dict.Dict(String, types.WebPresenceRecord),
web_presence_order: List(String),
deleted_web_presence_ids: dict.Dict(String, Bool),
market_localizations: dict.Dict(
String,
types.MarketLocalizationRecord,
),
markets_root_payloads: dict.Dict(
String,
types.CapturedJsonValue,
),
product_media: dict.Dict(
String,
List(types.ProductMediaRecord),
),
files: dict.Dict(String, types.FileRecord),
file_order: List(String),
deleted_file_ids: dict.Dict(String, Bool),
collections: dict.Dict(String, types.CollectionRecord),
collection_order: List(String),
product_collections: dict.Dict(
String,
types.ProductCollectionRecord,
),
deleted_collection_ids: dict.Dict(String, Bool),
locations: dict.Dict(String, types.LocationRecord),
location_order: List(String),
publications: dict.Dict(String, types.PublicationRecord),
publication_order: List(String),
deleted_publication_ids: dict.Dict(String, Bool),
channels: dict.Dict(String, types.ChannelRecord),
channel_order: List(String),
product_feeds: dict.Dict(String, types.ProductFeedRecord),
product_feed_order: List(String),
deleted_product_feed_ids: dict.Dict(String, Bool),
product_resource_feedback: dict.Dict(
String,
types.ProductResourceFeedbackRecord,
),
shop_resource_feedback: dict.Dict(
String,
types.ShopResourceFeedbackRecord,
),
abandoned_checkouts: dict.Dict(
String,
types.AbandonedCheckoutRecord,
),
abandoned_checkout_order: List(String),
abandonments: dict.Dict(String, types.AbandonmentRecord),
abandonment_order: List(String),
draft_orders: dict.Dict(String, types.DraftOrderRecord),
draft_order_order: List(String),
deleted_draft_order_ids: dict.Dict(String, Bool),
draft_order_variant_catalog: dict.Dict(
String,
types.DraftOrderVariantCatalogRecord,
),
orders: dict.Dict(String, types.OrderRecord),
order_order: List(String),
deleted_order_ids: dict.Dict(String, Bool),
order_mandate_payments: dict.Dict(
String,
types.OrderMandatePaymentRecord,
),
inventory_transfers: dict.Dict(
String,
types.InventoryTransferRecord,
),
inventory_transfer_order: List(String),
deleted_inventory_transfer_ids: dict.Dict(String, Bool),
inventory_shipments: dict.Dict(
String,
types.InventoryShipmentRecord,
),
inventory_shipment_order: List(String),
deleted_inventory_shipment_ids: dict.Dict(String, Bool),
carrier_services: dict.Dict(
String,
types.CarrierServiceRecord,
),
carrier_service_order: List(String),
deleted_carrier_service_ids: dict.Dict(String, Bool),
fulfillment_services: dict.Dict(
String,
types.FulfillmentServiceRecord,
),
fulfillment_service_order: List(String),
deleted_fulfillment_service_ids: dict.Dict(String, Bool),
fulfillments: dict.Dict(String, types.FulfillmentRecord),
fulfillment_order: List(String),
fulfillment_orders: dict.Dict(
String,
types.FulfillmentOrderRecord,
),
fulfillment_order_order: List(String),
shipping_orders: dict.Dict(String, types.ShippingOrderRecord),
reverse_fulfillment_orders: dict.Dict(
String,
types.ReverseFulfillmentOrderRecord,
),
reverse_fulfillment_order_order: List(String),
reverse_deliveries: dict.Dict(
String,
types.ReverseDeliveryRecord,
),
reverse_delivery_order: List(String),
calculated_orders: dict.Dict(
String,
types.CalculatedOrderRecord,
),
delivery_profiles: dict.Dict(
String,
types.DeliveryProfileRecord,
),
delivery_profile_order: List(String),
deleted_delivery_profile_ids: dict.Dict(String, Bool),
shipping_packages: dict.Dict(
String,
types.ShippingPackageRecord,
),
shipping_package_order: List(String),
deleted_shipping_package_ids: dict.Dict(String, Bool),
backup_region: option.Option(types.BackupRegionRecord),
admin_platform_generic_nodes: dict.Dict(
String,
types.AdminPlatformGenericNodeRecord,
),
admin_platform_taxonomy_categories: dict.Dict(
String,
types.AdminPlatformTaxonomyCategoryRecord,
),
admin_platform_taxonomy_category_order: List(String),
admin_platform_flow_signatures: dict.Dict(
String,
types.AdminPlatformFlowSignatureRecord,
),
admin_platform_flow_signature_order: List(String),
admin_platform_flow_triggers: dict.Dict(
String,
types.AdminPlatformFlowTriggerRecord,
),
admin_platform_flow_trigger_order: List(String),
shop: option.Option(types.ShopRecord),
b2b_companies: dict.Dict(String, types.B2BCompanyRecord),
b2b_company_order: List(String),
deleted_b2b_company_ids: dict.Dict(String, Bool),
b2b_company_contacts: dict.Dict(
String,
types.B2BCompanyContactRecord,
),
b2b_company_contact_order: List(String),
deleted_b2b_company_contact_ids: dict.Dict(String, Bool),
b2b_company_contact_roles: dict.Dict(
String,
types.B2BCompanyContactRoleRecord,
),
b2b_company_contact_role_order: List(String),
deleted_b2b_company_contact_role_ids: dict.Dict(String, Bool),
b2b_company_locations: dict.Dict(
String,
types.B2BCompanyLocationRecord,
),
b2b_company_location_order: List(String),
deleted_b2b_company_location_ids: dict.Dict(String, Bool),
store_property_locations: dict.Dict(
String,
types.StorePropertyRecord,
),
store_property_location_order: List(String),
deleted_store_property_location_ids: dict.Dict(String, Bool),
business_entities: dict.Dict(
String,
types.StorePropertyRecord,
),
business_entity_order: List(String),
publishables: dict.Dict(String, types.StorePropertyRecord),
publishable_order: List(String),
store_property_mutation_payloads: dict.Dict(
String,
types.StorePropertyMutationPayloadRecord,
),
product_metafields: dict.Dict(
String,
types.ProductMetafieldRecord,
),
metafield_definitions: dict.Dict(
String,
types.MetafieldDefinitionRecord,
),
deleted_metafield_definition_ids: dict.Dict(String, Bool),
saved_searches: dict.Dict(String, types.SavedSearchRecord),
saved_search_order: List(String),
deleted_saved_search_ids: dict.Dict(String, Bool),
webhook_subscriptions: dict.Dict(
String,
types.WebhookSubscriptionRecord,
),
webhook_subscription_order: List(String),
deleted_webhook_subscription_ids: dict.Dict(String, Bool),
online_store_content: dict.Dict(
String,
types.OnlineStoreContentRecord,
),
online_store_content_order: List(String),
deleted_online_store_content_ids: dict.Dict(String, Bool),
online_store_integrations: dict.Dict(
String,
types.OnlineStoreIntegrationRecord,
),
online_store_integration_order: List(String),
deleted_online_store_integration_ids: dict.Dict(String, Bool),
apps: dict.Dict(String, types.AppRecord),
app_order: List(String),
app_installations: dict.Dict(
String,
types.AppInstallationRecord,
),
app_installation_order: List(String),
current_installation_id: option.Option(String),
app_subscriptions: dict.Dict(
String,
types.AppSubscriptionRecord,
),
app_subscription_order: List(String),
app_subscription_line_items: dict.Dict(
String,
types.AppSubscriptionLineItemRecord,
),
app_subscription_line_item_order: List(String),
app_one_time_purchases: dict.Dict(
String,
types.AppOneTimePurchaseRecord,
),
app_one_time_purchase_order: List(String),
app_usage_records: dict.Dict(String, types.AppUsageRecord),
app_usage_record_order: List(String),
delegated_access_tokens: dict.Dict(
String,
types.DelegatedAccessTokenRecord,
),
delegated_access_token_order: List(String),
shopify_functions: dict.Dict(
String,
types.ShopifyFunctionRecord,
),
shopify_function_order: List(String),
bulk_operations: dict.Dict(String, types.BulkOperationRecord),
bulk_operation_order: List(String),
metaobject_definitions: dict.Dict(
String,
types.MetaobjectDefinitionRecord,
),
metaobject_definition_order: List(String),
deleted_metaobject_definition_ids: dict.Dict(String, Bool),
metaobjects: dict.Dict(String, types.MetaobjectRecord),
metaobject_order: List(String),
deleted_metaobject_ids: dict.Dict(String, Bool),
marketing_activities: dict.Dict(String, types.MarketingRecord),
marketing_activity_order: List(String),
marketing_events: dict.Dict(String, types.MarketingRecord),
marketing_event_order: List(String),
marketing_engagements: dict.Dict(
String,
types.MarketingEngagementRecord,
),
marketing_engagement_order: List(String),
deleted_marketing_activity_ids: dict.Dict(String, Bool),
deleted_marketing_event_ids: dict.Dict(String, Bool),
deleted_marketing_engagement_ids: dict.Dict(String, Bool),
validations: dict.Dict(String, types.ValidationRecord),
validation_order: List(String),
deleted_validation_ids: dict.Dict(String, Bool),
cart_transforms: dict.Dict(String, types.CartTransformRecord),
cart_transform_order: List(String),
deleted_cart_transform_ids: dict.Dict(String, Bool),
tax_app_configuration: option.Option(
types.TaxAppConfigurationRecord,
),
discounts: dict.Dict(String, types.DiscountRecord),
discount_order: List(String),
deleted_discount_ids: dict.Dict(String, Bool),
discount_bulk_operations: dict.Dict(
String,
types.DiscountBulkOperationRecord,
),
gift_cards: dict.Dict(String, types.GiftCardRecord),
gift_card_order: List(String),
gift_card_configuration: option.Option(
types.GiftCardConfigurationRecord,
),
customers: dict.Dict(String, types.CustomerRecord),
customer_order: List(String),
customer_catalog_connections: dict.Dict(
String,
types.CustomerCatalogConnectionRecord,
),
deleted_customer_ids: dict.Dict(String, Bool),
customer_addresses: dict.Dict(
String,
types.CustomerAddressRecord,
),
customer_address_order: List(String),
deleted_customer_address_ids: dict.Dict(String, Bool),
customer_order_summaries: dict.Dict(
String,
types.CustomerOrderSummaryRecord,
),
customer_order_connection_page_infos: dict.Dict(
String,
types.CustomerCatalogPageInfoRecord,
),
customer_event_summaries: dict.Dict(
String,
types.CustomerEventSummaryRecord,
),
customer_event_connection_page_infos: dict.Dict(
String,
types.CustomerCatalogPageInfoRecord,
),
customer_last_orders: dict.Dict(
String,
types.CustomerOrderSummaryRecord,
),
customer_metafields: dict.Dict(
String,
types.CustomerMetafieldRecord,
),
customer_payment_methods: dict.Dict(
String,
types.CustomerPaymentMethodRecord,
),
customer_payment_method_update_urls: dict.Dict(
String,
types.CustomerPaymentMethodUpdateUrlRecord,
),
deleted_customer_payment_method_ids: dict.Dict(String, Bool),
payment_reminder_sends: dict.Dict(
String,
types.PaymentReminderSendRecord,
),
payment_customizations: dict.Dict(
String,
types.PaymentCustomizationRecord,
),
payment_customization_order: List(String),
deleted_payment_customization_ids: dict.Dict(String, Bool),
payment_terms: dict.Dict(String, types.PaymentTermsRecord),
payment_terms_owner_ids: dict.Dict(String, Bool),
payment_terms_by_owner_id: dict.Dict(String, String),
deleted_payment_terms_ids: dict.Dict(String, Bool),
store_credit_accounts: dict.Dict(
String,
types.StoreCreditAccountRecord,
),
store_credit_account_transactions: dict.Dict(
String,
types.StoreCreditAccountTransactionRecord,
),
customer_account_pages: dict.Dict(
String,
types.CustomerAccountPageRecord,
),
customer_account_page_order: List(String),
customer_data_erasure_requests: dict.Dict(
String,
types.CustomerDataErasureRequestRecord,
),
merged_customer_ids: dict.Dict(String, String),
customer_merge_requests: dict.Dict(
String,
types.CustomerMergeRequestRecord,
),
segments: dict.Dict(String, types.SegmentRecord),
segment_order: List(String),
deleted_segment_ids: dict.Dict(String, Bool),
segment_root_payloads: dict.Dict(
String,
types.StorePropertyValue,
),
customer_segment_members_queries: dict.Dict(
String,
types.CustomerSegmentMembersQueryRecord,
),
customer_segment_members_query_order: List(String),
available_locales: List(types.LocaleRecord),
shop_locales: dict.Dict(String, types.ShopLocaleRecord),
translations: dict.Dict(String, types.TranslationRecord),
)
}
Constructors
-
BaseState( products: dict.Dict(String, types.ProductRecord), product_order: List(String), deleted_product_ids: dict.Dict(String, Bool), product_count: option.Option(Int), product_variants: dict.Dict(String, types.ProductVariantRecord), product_variant_order: List(String), product_variant_count: option.Option(Int), product_options: dict.Dict(String, types.ProductOptionRecord), product_operations: dict.Dict( String, types.ProductOperationRecord, ), selling_plan_groups: dict.Dict( String, types.SellingPlanGroupRecord, ), selling_plan_group_order: List(String), deleted_selling_plan_group_ids: dict.Dict(String, Bool), markets: dict.Dict(String, types.MarketRecord), market_order: List(String), deleted_market_ids: dict.Dict(String, Bool), catalogs: dict.Dict(String, types.CatalogRecord), catalog_order: List(String), deleted_catalog_ids: dict.Dict(String, Bool), price_lists: dict.Dict(String, types.PriceListRecord), price_list_order: List(String), deleted_price_list_ids: dict.Dict(String, Bool), web_presences: dict.Dict(String, types.WebPresenceRecord), web_presence_order: List(String), deleted_web_presence_ids: dict.Dict(String, Bool), market_localizations: dict.Dict( String, types.MarketLocalizationRecord, ), markets_root_payloads: dict.Dict( String, types.CapturedJsonValue, ), product_media: dict.Dict(String, List(types.ProductMediaRecord)), files: dict.Dict(String, types.FileRecord), file_order: List(String), deleted_file_ids: dict.Dict(String, Bool), collections: dict.Dict(String, types.CollectionRecord), collection_order: List(String), product_collections: dict.Dict( String, types.ProductCollectionRecord, ), deleted_collection_ids: dict.Dict(String, Bool), locations: dict.Dict(String, types.LocationRecord), location_order: List(String), publications: dict.Dict(String, types.PublicationRecord), publication_order: List(String), deleted_publication_ids: dict.Dict(String, Bool), channels: dict.Dict(String, types.ChannelRecord), channel_order: List(String), product_feeds: dict.Dict(String, types.ProductFeedRecord), product_feed_order: List(String), deleted_product_feed_ids: dict.Dict(String, Bool), product_resource_feedback: dict.Dict( String, types.ProductResourceFeedbackRecord, ), shop_resource_feedback: dict.Dict( String, types.ShopResourceFeedbackRecord, ), abandoned_checkouts: dict.Dict( String, types.AbandonedCheckoutRecord, ), abandoned_checkout_order: List(String), abandonments: dict.Dict(String, types.AbandonmentRecord), abandonment_order: List(String), draft_orders: dict.Dict(String, types.DraftOrderRecord), draft_order_order: List(String), deleted_draft_order_ids: dict.Dict(String, Bool), draft_order_variant_catalog: dict.Dict( String, types.DraftOrderVariantCatalogRecord, ), orders: dict.Dict(String, types.OrderRecord), order_order: List(String), deleted_order_ids: dict.Dict(String, Bool), order_mandate_payments: dict.Dict( String, types.OrderMandatePaymentRecord, ), inventory_transfers: dict.Dict( String, types.InventoryTransferRecord, ), inventory_transfer_order: List(String), deleted_inventory_transfer_ids: dict.Dict(String, Bool), inventory_shipments: dict.Dict( String, types.InventoryShipmentRecord, ), inventory_shipment_order: List(String), deleted_inventory_shipment_ids: dict.Dict(String, Bool), carrier_services: dict.Dict(String, types.CarrierServiceRecord), carrier_service_order: List(String), deleted_carrier_service_ids: dict.Dict(String, Bool), fulfillment_services: dict.Dict( String, types.FulfillmentServiceRecord, ), fulfillment_service_order: List(String), deleted_fulfillment_service_ids: dict.Dict(String, Bool), fulfillments: dict.Dict(String, types.FulfillmentRecord), fulfillment_order: List(String), fulfillment_orders: dict.Dict( String, types.FulfillmentOrderRecord, ), fulfillment_order_order: List(String), shipping_orders: dict.Dict(String, types.ShippingOrderRecord), reverse_fulfillment_orders: dict.Dict( String, types.ReverseFulfillmentOrderRecord, ), reverse_fulfillment_order_order: List(String), reverse_deliveries: dict.Dict( String, types.ReverseDeliveryRecord, ), reverse_delivery_order: List(String), calculated_orders: dict.Dict( String, types.CalculatedOrderRecord, ), delivery_profiles: dict.Dict( String, types.DeliveryProfileRecord, ), delivery_profile_order: List(String), deleted_delivery_profile_ids: dict.Dict(String, Bool), shipping_packages: dict.Dict( String, types.ShippingPackageRecord, ), shipping_package_order: List(String), deleted_shipping_package_ids: dict.Dict(String, Bool), backup_region: option.Option(types.BackupRegionRecord), admin_platform_generic_nodes: dict.Dict( String, types.AdminPlatformGenericNodeRecord, ), admin_platform_taxonomy_categories: dict.Dict( String, types.AdminPlatformTaxonomyCategoryRecord, ), admin_platform_taxonomy_category_order: List(String), admin_platform_flow_signatures: dict.Dict( String, types.AdminPlatformFlowSignatureRecord, ), admin_platform_flow_signature_order: List(String), admin_platform_flow_triggers: dict.Dict( String, types.AdminPlatformFlowTriggerRecord, ), admin_platform_flow_trigger_order: List(String), shop: option.Option(types.ShopRecord), b2b_companies: dict.Dict(String, types.B2BCompanyRecord), b2b_company_order: List(String), deleted_b2b_company_ids: dict.Dict(String, Bool), b2b_company_contacts: dict.Dict( String, types.B2BCompanyContactRecord, ), b2b_company_contact_order: List(String), deleted_b2b_company_contact_ids: dict.Dict(String, Bool), b2b_company_contact_roles: dict.Dict( String, types.B2BCompanyContactRoleRecord, ), b2b_company_contact_role_order: List(String), deleted_b2b_company_contact_role_ids: dict.Dict(String, Bool), b2b_company_locations: dict.Dict( String, types.B2BCompanyLocationRecord, ), b2b_company_location_order: List(String), deleted_b2b_company_location_ids: dict.Dict(String, Bool), store_property_locations: dict.Dict( String, types.StorePropertyRecord, ), store_property_location_order: List(String), deleted_store_property_location_ids: dict.Dict(String, Bool), business_entities: dict.Dict(String, types.StorePropertyRecord), business_entity_order: List(String), publishables: dict.Dict(String, types.StorePropertyRecord), publishable_order: List(String), store_property_mutation_payloads: dict.Dict( String, types.StorePropertyMutationPayloadRecord, ), product_metafields: dict.Dict( String, types.ProductMetafieldRecord, ), metafield_definitions: dict.Dict( String, types.MetafieldDefinitionRecord, ), deleted_metafield_definition_ids: dict.Dict(String, Bool), saved_searches: dict.Dict(String, types.SavedSearchRecord), saved_search_order: List(String), deleted_saved_search_ids: dict.Dict(String, Bool), webhook_subscriptions: dict.Dict( String, types.WebhookSubscriptionRecord, ), webhook_subscription_order: List(String), deleted_webhook_subscription_ids: dict.Dict(String, Bool), online_store_content: dict.Dict( String, types.OnlineStoreContentRecord, ), online_store_content_order: List(String), deleted_online_store_content_ids: dict.Dict(String, Bool), online_store_integrations: dict.Dict( String, types.OnlineStoreIntegrationRecord, ), online_store_integration_order: List(String), deleted_online_store_integration_ids: dict.Dict(String, Bool), apps: dict.Dict(String, types.AppRecord), app_order: List(String), app_installations: dict.Dict( String, types.AppInstallationRecord, ), app_installation_order: List(String), current_installation_id: option.Option(String), app_subscriptions: dict.Dict( String, types.AppSubscriptionRecord, ), app_subscription_order: List(String), app_subscription_line_items: dict.Dict( String, types.AppSubscriptionLineItemRecord, ), app_subscription_line_item_order: List(String), app_one_time_purchases: dict.Dict( String, types.AppOneTimePurchaseRecord, ), app_one_time_purchase_order: List(String), app_usage_records: dict.Dict(String, types.AppUsageRecord), app_usage_record_order: List(String), delegated_access_tokens: dict.Dict( String, types.DelegatedAccessTokenRecord, ), delegated_access_token_order: List(String), shopify_functions: dict.Dict( String, types.ShopifyFunctionRecord, ), shopify_function_order: List(String), bulk_operations: dict.Dict(String, types.BulkOperationRecord), bulk_operation_order: List(String), metaobject_definitions: dict.Dict( String, types.MetaobjectDefinitionRecord, ), metaobject_definition_order: List(String), deleted_metaobject_definition_ids: dict.Dict(String, Bool), metaobjects: dict.Dict(String, types.MetaobjectRecord), metaobject_order: List(String), deleted_metaobject_ids: dict.Dict(String, Bool), marketing_activities: dict.Dict(String, types.MarketingRecord), marketing_activity_order: List(String), marketing_events: dict.Dict(String, types.MarketingRecord), marketing_event_order: List(String), marketing_engagements: dict.Dict( String, types.MarketingEngagementRecord, ), marketing_engagement_order: List(String), deleted_marketing_activity_ids: dict.Dict(String, Bool), deleted_marketing_event_ids: dict.Dict(String, Bool), deleted_marketing_engagement_ids: dict.Dict(String, Bool), validations: dict.Dict(String, types.ValidationRecord), validation_order: List(String), deleted_validation_ids: dict.Dict(String, Bool), cart_transforms: dict.Dict(String, types.CartTransformRecord), cart_transform_order: List(String), deleted_cart_transform_ids: dict.Dict(String, Bool), tax_app_configuration: option.Option( types.TaxAppConfigurationRecord, ), discounts: dict.Dict(String, types.DiscountRecord), discount_order: List(String), deleted_discount_ids: dict.Dict(String, Bool), discount_bulk_operations: dict.Dict( String, types.DiscountBulkOperationRecord, ), gift_cards: dict.Dict(String, types.GiftCardRecord), gift_card_order: List(String), gift_card_configuration: option.Option( types.GiftCardConfigurationRecord, ), customers: dict.Dict(String, types.CustomerRecord), customer_order: List(String), customer_catalog_connections: dict.Dict( String, types.CustomerCatalogConnectionRecord, ), deleted_customer_ids: dict.Dict(String, Bool), customer_addresses: dict.Dict( String, types.CustomerAddressRecord, ), customer_address_order: List(String), deleted_customer_address_ids: dict.Dict(String, Bool), customer_order_summaries: dict.Dict( String, types.CustomerOrderSummaryRecord, ), customer_order_connection_page_infos: dict.Dict( String, types.CustomerCatalogPageInfoRecord, ), customer_event_summaries: dict.Dict( String, types.CustomerEventSummaryRecord, ), customer_event_connection_page_infos: dict.Dict( String, types.CustomerCatalogPageInfoRecord, ), customer_last_orders: dict.Dict( String, types.CustomerOrderSummaryRecord, ), customer_metafields: dict.Dict( String, types.CustomerMetafieldRecord, ), customer_payment_methods: dict.Dict( String, types.CustomerPaymentMethodRecord, ), customer_payment_method_update_urls: dict.Dict( String, types.CustomerPaymentMethodUpdateUrlRecord, ), deleted_customer_payment_method_ids: dict.Dict(String, Bool), payment_reminder_sends: dict.Dict( String, types.PaymentReminderSendRecord, ), payment_customizations: dict.Dict( String, types.PaymentCustomizationRecord, ), payment_customization_order: List(String), deleted_payment_customization_ids: dict.Dict(String, Bool), payment_terms: dict.Dict(String, types.PaymentTermsRecord), payment_terms_owner_ids: dict.Dict(String, Bool), payment_terms_by_owner_id: dict.Dict(String, String), deleted_payment_terms_ids: dict.Dict(String, Bool), store_credit_accounts: dict.Dict( String, types.StoreCreditAccountRecord, ), store_credit_account_transactions: dict.Dict( String, types.StoreCreditAccountTransactionRecord, ), customer_account_pages: dict.Dict( String, types.CustomerAccountPageRecord, ), customer_account_page_order: List(String), customer_data_erasure_requests: dict.Dict( String, types.CustomerDataErasureRequestRecord, ), merged_customer_ids: dict.Dict(String, String), customer_merge_requests: dict.Dict( String, types.CustomerMergeRequestRecord, ), segments: dict.Dict(String, types.SegmentRecord), segment_order: List(String), deleted_segment_ids: dict.Dict(String, Bool), segment_root_payloads: dict.Dict( String, types.StorePropertyValue, ), customer_segment_members_queries: dict.Dict( String, types.CustomerSegmentMembersQueryRecord, ), customer_segment_members_query_order: List(String), available_locales: List(types.LocaleRecord), shop_locales: dict.Dict(String, types.ShopLocaleRecord), translations: dict.Dict(String, types.TranslationRecord), )
Capability metadata recorded alongside each mutation log entry.
Mirrors MutationLogInterpretedMetadata['capability'].
pub type Capability {
Capability(
operation_name: option.Option(String),
domain: String,
execution: String,
)
}
Constructors
-
Capability( operation_name: option.Option(String), domain: String, execution: String, )
Status the mutation log records each entry under. Mirrors
'staged' | 'proxied' | 'committed' | 'failed'.
pub type EntryStatus {
Staged
Proxied
Committed
Failed
}
Constructors
-
Staged -
Proxied -
Committed -
Failed
Slim port of MutationLogInterpretedMetadata. Only the fields the
Gleam port currently writes are modelled. The optional pieces
(registeredOperation, safety, bulkOperationImport) are deferred
until their producers port.
pub type InterpretedMetadata {
InterpretedMetadata(
operation_type: OperationType,
operation_name: option.Option(String),
root_fields: List(String),
primary_root_field: option.Option(String),
capability: Capability,
)
}
Constructors
-
InterpretedMetadata( operation_type: OperationType, operation_name: option.Option(String), root_fields: List(String), primary_root_field: option.Option(String), capability: Capability, )
Slim port of MutationLogEntry. requestBody and the optional
fields are deferred to the next pass that produces them.
pub type MutationLogEntry {
MutationLogEntry(
id: String,
received_at: String,
operation_name: option.Option(String),
path: String,
query: String,
variables: dict.Dict(String, root_field.ResolvedValue),
staged_resource_ids: List(String),
status: EntryStatus,
interpreted: InterpretedMetadata,
notes: option.Option(String),
)
}
Constructors
-
MutationLogEntry( id: String, received_at: String, operation_name: option.Option(String), path: String, query: String, variables: dict.Dict(String, root_field.ResolvedValue), staged_resource_ids: List(String), status: EntryStatus, interpreted: InterpretedMetadata, notes: option.Option(String), )
Operation type a mutation log entry was recorded for. Mirrors the
'query' | 'mutation' union in TS.
pub type OperationType {
Query
Mutation
}
Constructors
-
Query -
Mutation
Mutations the proxy has staged but not yet committed upstream.
Mirrors the staged slices of StateSnapshot.
pub type StagedState {
StagedState(
products: dict.Dict(String, types.ProductRecord),
product_order: List(String),
deleted_product_ids: dict.Dict(String, Bool),
product_count: option.Option(Int),
product_variants: dict.Dict(
String,
types.ProductVariantRecord,
),
product_variant_order: List(String),
product_variant_count: option.Option(Int),
product_options: dict.Dict(String, types.ProductOptionRecord),
product_operations: dict.Dict(
String,
types.ProductOperationRecord,
),
selling_plan_groups: dict.Dict(
String,
types.SellingPlanGroupRecord,
),
selling_plan_group_order: List(String),
deleted_selling_plan_group_ids: dict.Dict(String, Bool),
markets: dict.Dict(String, types.MarketRecord),
market_order: List(String),
deleted_market_ids: dict.Dict(String, Bool),
catalogs: dict.Dict(String, types.CatalogRecord),
catalog_order: List(String),
deleted_catalog_ids: dict.Dict(String, Bool),
price_lists: dict.Dict(String, types.PriceListRecord),
price_list_order: List(String),
deleted_price_list_ids: dict.Dict(String, Bool),
web_presences: dict.Dict(String, types.WebPresenceRecord),
web_presence_order: List(String),
deleted_web_presence_ids: dict.Dict(String, Bool),
market_localizations: dict.Dict(
String,
types.MarketLocalizationRecord,
),
markets_root_payloads: dict.Dict(
String,
types.CapturedJsonValue,
),
product_media: dict.Dict(
String,
List(types.ProductMediaRecord),
),
files: dict.Dict(String, types.FileRecord),
file_order: List(String),
deleted_file_ids: dict.Dict(String, Bool),
collections: dict.Dict(String, types.CollectionRecord),
collection_order: List(String),
product_collections: dict.Dict(
String,
types.ProductCollectionRecord,
),
staged_product_collection_families: dict.Dict(String, Bool),
deleted_collection_ids: dict.Dict(String, Bool),
publications: dict.Dict(String, types.PublicationRecord),
publication_order: List(String),
deleted_publication_ids: dict.Dict(String, Bool),
product_feeds: dict.Dict(String, types.ProductFeedRecord),
product_feed_order: List(String),
deleted_product_feed_ids: dict.Dict(String, Bool),
product_resource_feedback: dict.Dict(
String,
types.ProductResourceFeedbackRecord,
),
shop_resource_feedback: dict.Dict(
String,
types.ShopResourceFeedbackRecord,
),
abandoned_checkouts: dict.Dict(
String,
types.AbandonedCheckoutRecord,
),
abandoned_checkout_order: List(String),
abandonments: dict.Dict(String, types.AbandonmentRecord),
abandonment_order: List(String),
draft_orders: dict.Dict(String, types.DraftOrderRecord),
draft_order_order: List(String),
deleted_draft_order_ids: dict.Dict(String, Bool),
draft_order_variant_catalog: dict.Dict(
String,
types.DraftOrderVariantCatalogRecord,
),
orders: dict.Dict(String, types.OrderRecord),
order_order: List(String),
deleted_order_ids: dict.Dict(String, Bool),
order_mandate_payments: dict.Dict(
String,
types.OrderMandatePaymentRecord,
),
inventory_transfers: dict.Dict(
String,
types.InventoryTransferRecord,
),
inventory_transfer_order: List(String),
deleted_inventory_transfer_ids: dict.Dict(String, Bool),
inventory_shipments: dict.Dict(
String,
types.InventoryShipmentRecord,
),
inventory_shipment_order: List(String),
deleted_inventory_shipment_ids: dict.Dict(String, Bool),
carrier_services: dict.Dict(
String,
types.CarrierServiceRecord,
),
carrier_service_order: List(String),
deleted_carrier_service_ids: dict.Dict(String, Bool),
fulfillment_services: dict.Dict(
String,
types.FulfillmentServiceRecord,
),
fulfillment_service_order: List(String),
deleted_fulfillment_service_ids: dict.Dict(String, Bool),
fulfillments: dict.Dict(String, types.FulfillmentRecord),
fulfillment_order: List(String),
fulfillment_orders: dict.Dict(
String,
types.FulfillmentOrderRecord,
),
fulfillment_order_order: List(String),
shipping_orders: dict.Dict(String, types.ShippingOrderRecord),
reverse_fulfillment_orders: dict.Dict(
String,
types.ReverseFulfillmentOrderRecord,
),
reverse_fulfillment_order_order: List(String),
reverse_deliveries: dict.Dict(
String,
types.ReverseDeliveryRecord,
),
reverse_delivery_order: List(String),
calculated_orders: dict.Dict(
String,
types.CalculatedOrderRecord,
),
delivery_profiles: dict.Dict(
String,
types.DeliveryProfileRecord,
),
delivery_profile_order: List(String),
deleted_delivery_profile_ids: dict.Dict(String, Bool),
shipping_packages: dict.Dict(
String,
types.ShippingPackageRecord,
),
shipping_package_order: List(String),
deleted_shipping_package_ids: dict.Dict(String, Bool),
backup_region: option.Option(types.BackupRegionRecord),
admin_platform_generic_nodes: dict.Dict(
String,
types.AdminPlatformGenericNodeRecord,
),
admin_platform_taxonomy_categories: dict.Dict(
String,
types.AdminPlatformTaxonomyCategoryRecord,
),
admin_platform_taxonomy_category_order: List(String),
admin_platform_flow_signatures: dict.Dict(
String,
types.AdminPlatformFlowSignatureRecord,
),
admin_platform_flow_signature_order: List(String),
admin_platform_flow_triggers: dict.Dict(
String,
types.AdminPlatformFlowTriggerRecord,
),
admin_platform_flow_trigger_order: List(String),
shop: option.Option(types.ShopRecord),
b2b_companies: dict.Dict(String, types.B2BCompanyRecord),
b2b_company_order: List(String),
deleted_b2b_company_ids: dict.Dict(String, Bool),
b2b_company_contacts: dict.Dict(
String,
types.B2BCompanyContactRecord,
),
b2b_company_contact_order: List(String),
deleted_b2b_company_contact_ids: dict.Dict(String, Bool),
b2b_company_contact_roles: dict.Dict(
String,
types.B2BCompanyContactRoleRecord,
),
b2b_company_contact_role_order: List(String),
deleted_b2b_company_contact_role_ids: dict.Dict(String, Bool),
b2b_company_locations: dict.Dict(
String,
types.B2BCompanyLocationRecord,
),
b2b_company_location_order: List(String),
deleted_b2b_company_location_ids: dict.Dict(String, Bool),
store_property_locations: dict.Dict(
String,
types.StorePropertyRecord,
),
store_property_location_order: List(String),
deleted_store_property_location_ids: dict.Dict(String, Bool),
business_entities: dict.Dict(
String,
types.StorePropertyRecord,
),
business_entity_order: List(String),
publishables: dict.Dict(String, types.StorePropertyRecord),
publishable_order: List(String),
store_property_mutation_payloads: dict.Dict(
String,
types.StorePropertyMutationPayloadRecord,
),
product_metafields: dict.Dict(
String,
types.ProductMetafieldRecord,
),
metafield_definitions: dict.Dict(
String,
types.MetafieldDefinitionRecord,
),
deleted_metafield_definition_ids: dict.Dict(String, Bool),
saved_searches: dict.Dict(String, types.SavedSearchRecord),
saved_search_order: List(String),
deleted_saved_search_ids: dict.Dict(String, Bool),
webhook_subscriptions: dict.Dict(
String,
types.WebhookSubscriptionRecord,
),
webhook_subscription_order: List(String),
deleted_webhook_subscription_ids: dict.Dict(String, Bool),
online_store_content: dict.Dict(
String,
types.OnlineStoreContentRecord,
),
online_store_content_order: List(String),
deleted_online_store_content_ids: dict.Dict(String, Bool),
online_store_integrations: dict.Dict(
String,
types.OnlineStoreIntegrationRecord,
),
online_store_integration_order: List(String),
deleted_online_store_integration_ids: dict.Dict(String, Bool),
apps: dict.Dict(String, types.AppRecord),
app_order: List(String),
app_installations: dict.Dict(
String,
types.AppInstallationRecord,
),
app_installation_order: List(String),
current_installation_id: option.Option(String),
app_subscriptions: dict.Dict(
String,
types.AppSubscriptionRecord,
),
app_subscription_order: List(String),
app_subscription_line_items: dict.Dict(
String,
types.AppSubscriptionLineItemRecord,
),
app_subscription_line_item_order: List(String),
app_one_time_purchases: dict.Dict(
String,
types.AppOneTimePurchaseRecord,
),
app_one_time_purchase_order: List(String),
app_usage_records: dict.Dict(String, types.AppUsageRecord),
app_usage_record_order: List(String),
delegated_access_tokens: dict.Dict(
String,
types.DelegatedAccessTokenRecord,
),
delegated_access_token_order: List(String),
shopify_functions: dict.Dict(
String,
types.ShopifyFunctionRecord,
),
shopify_function_order: List(String),
bulk_operations: dict.Dict(String, types.BulkOperationRecord),
bulk_operation_order: List(String),
staged_upload_contents: dict.Dict(String, String),
metaobject_definitions: dict.Dict(
String,
types.MetaobjectDefinitionRecord,
),
metaobject_definition_order: List(String),
deleted_metaobject_definition_ids: dict.Dict(String, Bool),
metaobjects: dict.Dict(String, types.MetaobjectRecord),
metaobject_order: List(String),
deleted_metaobject_ids: dict.Dict(String, Bool),
marketing_activities: dict.Dict(String, types.MarketingRecord),
marketing_activity_order: List(String),
marketing_events: dict.Dict(String, types.MarketingRecord),
marketing_event_order: List(String),
marketing_engagements: dict.Dict(
String,
types.MarketingEngagementRecord,
),
marketing_engagement_order: List(String),
deleted_marketing_activity_ids: dict.Dict(String, Bool),
deleted_marketing_event_ids: dict.Dict(String, Bool),
deleted_marketing_engagement_ids: dict.Dict(String, Bool),
validations: dict.Dict(String, types.ValidationRecord),
validation_order: List(String),
deleted_validation_ids: dict.Dict(String, Bool),
cart_transforms: dict.Dict(String, types.CartTransformRecord),
cart_transform_order: List(String),
deleted_cart_transform_ids: dict.Dict(String, Bool),
tax_app_configuration: option.Option(
types.TaxAppConfigurationRecord,
),
discounts: dict.Dict(String, types.DiscountRecord),
discount_order: List(String),
deleted_discount_ids: dict.Dict(String, Bool),
discount_bulk_operations: dict.Dict(
String,
types.DiscountBulkOperationRecord,
),
gift_cards: dict.Dict(String, types.GiftCardRecord),
gift_card_order: List(String),
gift_card_configuration: option.Option(
types.GiftCardConfigurationRecord,
),
customers: dict.Dict(String, types.CustomerRecord),
customer_order: List(String),
deleted_customer_ids: dict.Dict(String, Bool),
customer_addresses: dict.Dict(
String,
types.CustomerAddressRecord,
),
customer_address_order: List(String),
deleted_customer_address_ids: dict.Dict(String, Bool),
customer_order_summaries: dict.Dict(
String,
types.CustomerOrderSummaryRecord,
),
customer_order_connection_page_infos: dict.Dict(
String,
types.CustomerCatalogPageInfoRecord,
),
customer_event_summaries: dict.Dict(
String,
types.CustomerEventSummaryRecord,
),
customer_event_connection_page_infos: dict.Dict(
String,
types.CustomerCatalogPageInfoRecord,
),
customer_last_orders: dict.Dict(
String,
types.CustomerOrderSummaryRecord,
),
customer_metafields: dict.Dict(
String,
types.CustomerMetafieldRecord,
),
customer_payment_methods: dict.Dict(
String,
types.CustomerPaymentMethodRecord,
),
customer_payment_method_update_urls: dict.Dict(
String,
types.CustomerPaymentMethodUpdateUrlRecord,
),
deleted_customer_payment_method_ids: dict.Dict(String, Bool),
payment_reminder_sends: dict.Dict(
String,
types.PaymentReminderSendRecord,
),
payment_customizations: dict.Dict(
String,
types.PaymentCustomizationRecord,
),
payment_customization_order: List(String),
deleted_payment_customization_ids: dict.Dict(String, Bool),
payment_terms: dict.Dict(String, types.PaymentTermsRecord),
payment_terms_owner_ids: dict.Dict(String, Bool),
payment_terms_by_owner_id: dict.Dict(String, String),
deleted_payment_terms_ids: dict.Dict(String, Bool),
store_credit_accounts: dict.Dict(
String,
types.StoreCreditAccountRecord,
),
store_credit_account_transactions: dict.Dict(
String,
types.StoreCreditAccountTransactionRecord,
),
customer_account_pages: dict.Dict(
String,
types.CustomerAccountPageRecord,
),
customer_account_page_order: List(String),
customer_data_erasure_requests: dict.Dict(
String,
types.CustomerDataErasureRequestRecord,
),
merged_customer_ids: dict.Dict(String, String),
customer_merge_requests: dict.Dict(
String,
types.CustomerMergeRequestRecord,
),
segments: dict.Dict(String, types.SegmentRecord),
segment_order: List(String),
deleted_segment_ids: dict.Dict(String, Bool),
customer_segment_members_queries: dict.Dict(
String,
types.CustomerSegmentMembersQueryRecord,
),
customer_segment_members_query_order: List(String),
shop_locales: dict.Dict(String, types.ShopLocaleRecord),
deleted_shop_locales: dict.Dict(String, Bool),
translations: dict.Dict(String, types.TranslationRecord),
deleted_translations: dict.Dict(String, Bool),
)
}
Constructors
-
StagedState( products: dict.Dict(String, types.ProductRecord), product_order: List(String), deleted_product_ids: dict.Dict(String, Bool), product_count: option.Option(Int), product_variants: dict.Dict(String, types.ProductVariantRecord), product_variant_order: List(String), product_variant_count: option.Option(Int), product_options: dict.Dict(String, types.ProductOptionRecord), product_operations: dict.Dict( String, types.ProductOperationRecord, ), selling_plan_groups: dict.Dict( String, types.SellingPlanGroupRecord, ), selling_plan_group_order: List(String), deleted_selling_plan_group_ids: dict.Dict(String, Bool), markets: dict.Dict(String, types.MarketRecord), market_order: List(String), deleted_market_ids: dict.Dict(String, Bool), catalogs: dict.Dict(String, types.CatalogRecord), catalog_order: List(String), deleted_catalog_ids: dict.Dict(String, Bool), price_lists: dict.Dict(String, types.PriceListRecord), price_list_order: List(String), deleted_price_list_ids: dict.Dict(String, Bool), web_presences: dict.Dict(String, types.WebPresenceRecord), web_presence_order: List(String), deleted_web_presence_ids: dict.Dict(String, Bool), market_localizations: dict.Dict( String, types.MarketLocalizationRecord, ), markets_root_payloads: dict.Dict( String, types.CapturedJsonValue, ), product_media: dict.Dict(String, List(types.ProductMediaRecord)), files: dict.Dict(String, types.FileRecord), file_order: List(String), deleted_file_ids: dict.Dict(String, Bool), collections: dict.Dict(String, types.CollectionRecord), collection_order: List(String), product_collections: dict.Dict( String, types.ProductCollectionRecord, ), staged_product_collection_families: dict.Dict(String, Bool), deleted_collection_ids: dict.Dict(String, Bool), publications: dict.Dict(String, types.PublicationRecord), publication_order: List(String), deleted_publication_ids: dict.Dict(String, Bool), product_feeds: dict.Dict(String, types.ProductFeedRecord), product_feed_order: List(String), deleted_product_feed_ids: dict.Dict(String, Bool), product_resource_feedback: dict.Dict( String, types.ProductResourceFeedbackRecord, ), shop_resource_feedback: dict.Dict( String, types.ShopResourceFeedbackRecord, ), abandoned_checkouts: dict.Dict( String, types.AbandonedCheckoutRecord, ), abandoned_checkout_order: List(String), abandonments: dict.Dict(String, types.AbandonmentRecord), abandonment_order: List(String), draft_orders: dict.Dict(String, types.DraftOrderRecord), draft_order_order: List(String), deleted_draft_order_ids: dict.Dict(String, Bool), draft_order_variant_catalog: dict.Dict( String, types.DraftOrderVariantCatalogRecord, ), orders: dict.Dict(String, types.OrderRecord), order_order: List(String), deleted_order_ids: dict.Dict(String, Bool), order_mandate_payments: dict.Dict( String, types.OrderMandatePaymentRecord, ), inventory_transfers: dict.Dict( String, types.InventoryTransferRecord, ), inventory_transfer_order: List(String), deleted_inventory_transfer_ids: dict.Dict(String, Bool), inventory_shipments: dict.Dict( String, types.InventoryShipmentRecord, ), inventory_shipment_order: List(String), deleted_inventory_shipment_ids: dict.Dict(String, Bool), carrier_services: dict.Dict(String, types.CarrierServiceRecord), carrier_service_order: List(String), deleted_carrier_service_ids: dict.Dict(String, Bool), fulfillment_services: dict.Dict( String, types.FulfillmentServiceRecord, ), fulfillment_service_order: List(String), deleted_fulfillment_service_ids: dict.Dict(String, Bool), fulfillments: dict.Dict(String, types.FulfillmentRecord), fulfillment_order: List(String), fulfillment_orders: dict.Dict( String, types.FulfillmentOrderRecord, ), fulfillment_order_order: List(String), shipping_orders: dict.Dict(String, types.ShippingOrderRecord), reverse_fulfillment_orders: dict.Dict( String, types.ReverseFulfillmentOrderRecord, ), reverse_fulfillment_order_order: List(String), reverse_deliveries: dict.Dict( String, types.ReverseDeliveryRecord, ), reverse_delivery_order: List(String), calculated_orders: dict.Dict( String, types.CalculatedOrderRecord, ), delivery_profiles: dict.Dict( String, types.DeliveryProfileRecord, ), delivery_profile_order: List(String), deleted_delivery_profile_ids: dict.Dict(String, Bool), shipping_packages: dict.Dict( String, types.ShippingPackageRecord, ), shipping_package_order: List(String), deleted_shipping_package_ids: dict.Dict(String, Bool), backup_region: option.Option(types.BackupRegionRecord), admin_platform_generic_nodes: dict.Dict( String, types.AdminPlatformGenericNodeRecord, ), admin_platform_taxonomy_categories: dict.Dict( String, types.AdminPlatformTaxonomyCategoryRecord, ), admin_platform_taxonomy_category_order: List(String), admin_platform_flow_signatures: dict.Dict( String, types.AdminPlatformFlowSignatureRecord, ), admin_platform_flow_signature_order: List(String), admin_platform_flow_triggers: dict.Dict( String, types.AdminPlatformFlowTriggerRecord, ), admin_platform_flow_trigger_order: List(String), shop: option.Option(types.ShopRecord), b2b_companies: dict.Dict(String, types.B2BCompanyRecord), b2b_company_order: List(String), deleted_b2b_company_ids: dict.Dict(String, Bool), b2b_company_contacts: dict.Dict( String, types.B2BCompanyContactRecord, ), b2b_company_contact_order: List(String), deleted_b2b_company_contact_ids: dict.Dict(String, Bool), b2b_company_contact_roles: dict.Dict( String, types.B2BCompanyContactRoleRecord, ), b2b_company_contact_role_order: List(String), deleted_b2b_company_contact_role_ids: dict.Dict(String, Bool), b2b_company_locations: dict.Dict( String, types.B2BCompanyLocationRecord, ), b2b_company_location_order: List(String), deleted_b2b_company_location_ids: dict.Dict(String, Bool), store_property_locations: dict.Dict( String, types.StorePropertyRecord, ), store_property_location_order: List(String), deleted_store_property_location_ids: dict.Dict(String, Bool), business_entities: dict.Dict(String, types.StorePropertyRecord), business_entity_order: List(String), publishables: dict.Dict(String, types.StorePropertyRecord), publishable_order: List(String), store_property_mutation_payloads: dict.Dict( String, types.StorePropertyMutationPayloadRecord, ), product_metafields: dict.Dict( String, types.ProductMetafieldRecord, ), metafield_definitions: dict.Dict( String, types.MetafieldDefinitionRecord, ), deleted_metafield_definition_ids: dict.Dict(String, Bool), saved_searches: dict.Dict(String, types.SavedSearchRecord), saved_search_order: List(String), deleted_saved_search_ids: dict.Dict(String, Bool), webhook_subscriptions: dict.Dict( String, types.WebhookSubscriptionRecord, ), webhook_subscription_order: List(String), deleted_webhook_subscription_ids: dict.Dict(String, Bool), online_store_content: dict.Dict( String, types.OnlineStoreContentRecord, ), online_store_content_order: List(String), deleted_online_store_content_ids: dict.Dict(String, Bool), online_store_integrations: dict.Dict( String, types.OnlineStoreIntegrationRecord, ), online_store_integration_order: List(String), deleted_online_store_integration_ids: dict.Dict(String, Bool), apps: dict.Dict(String, types.AppRecord), app_order: List(String), app_installations: dict.Dict( String, types.AppInstallationRecord, ), app_installation_order: List(String), current_installation_id: option.Option(String), app_subscriptions: dict.Dict( String, types.AppSubscriptionRecord, ), app_subscription_order: List(String), app_subscription_line_items: dict.Dict( String, types.AppSubscriptionLineItemRecord, ), app_subscription_line_item_order: List(String), app_one_time_purchases: dict.Dict( String, types.AppOneTimePurchaseRecord, ), app_one_time_purchase_order: List(String), app_usage_records: dict.Dict(String, types.AppUsageRecord), app_usage_record_order: List(String), delegated_access_tokens: dict.Dict( String, types.DelegatedAccessTokenRecord, ), delegated_access_token_order: List(String), shopify_functions: dict.Dict( String, types.ShopifyFunctionRecord, ), shopify_function_order: List(String), bulk_operations: dict.Dict(String, types.BulkOperationRecord), bulk_operation_order: List(String), staged_upload_contents: dict.Dict(String, String), metaobject_definitions: dict.Dict( String, types.MetaobjectDefinitionRecord, ), metaobject_definition_order: List(String), deleted_metaobject_definition_ids: dict.Dict(String, Bool), metaobjects: dict.Dict(String, types.MetaobjectRecord), metaobject_order: List(String), deleted_metaobject_ids: dict.Dict(String, Bool), marketing_activities: dict.Dict(String, types.MarketingRecord), marketing_activity_order: List(String), marketing_events: dict.Dict(String, types.MarketingRecord), marketing_event_order: List(String), marketing_engagements: dict.Dict( String, types.MarketingEngagementRecord, ), marketing_engagement_order: List(String), deleted_marketing_activity_ids: dict.Dict(String, Bool), deleted_marketing_event_ids: dict.Dict(String, Bool), deleted_marketing_engagement_ids: dict.Dict(String, Bool), validations: dict.Dict(String, types.ValidationRecord), validation_order: List(String), deleted_validation_ids: dict.Dict(String, Bool), cart_transforms: dict.Dict(String, types.CartTransformRecord), cart_transform_order: List(String), deleted_cart_transform_ids: dict.Dict(String, Bool), tax_app_configuration: option.Option( types.TaxAppConfigurationRecord, ), discounts: dict.Dict(String, types.DiscountRecord), discount_order: List(String), deleted_discount_ids: dict.Dict(String, Bool), discount_bulk_operations: dict.Dict( String, types.DiscountBulkOperationRecord, ), gift_cards: dict.Dict(String, types.GiftCardRecord), gift_card_order: List(String), gift_card_configuration: option.Option( types.GiftCardConfigurationRecord, ), customers: dict.Dict(String, types.CustomerRecord), customer_order: List(String), deleted_customer_ids: dict.Dict(String, Bool), customer_addresses: dict.Dict( String, types.CustomerAddressRecord, ), customer_address_order: List(String), deleted_customer_address_ids: dict.Dict(String, Bool), customer_order_summaries: dict.Dict( String, types.CustomerOrderSummaryRecord, ), customer_order_connection_page_infos: dict.Dict( String, types.CustomerCatalogPageInfoRecord, ), customer_event_summaries: dict.Dict( String, types.CustomerEventSummaryRecord, ), customer_event_connection_page_infos: dict.Dict( String, types.CustomerCatalogPageInfoRecord, ), customer_last_orders: dict.Dict( String, types.CustomerOrderSummaryRecord, ), customer_metafields: dict.Dict( String, types.CustomerMetafieldRecord, ), customer_payment_methods: dict.Dict( String, types.CustomerPaymentMethodRecord, ), customer_payment_method_update_urls: dict.Dict( String, types.CustomerPaymentMethodUpdateUrlRecord, ), deleted_customer_payment_method_ids: dict.Dict(String, Bool), payment_reminder_sends: dict.Dict( String, types.PaymentReminderSendRecord, ), payment_customizations: dict.Dict( String, types.PaymentCustomizationRecord, ), payment_customization_order: List(String), deleted_payment_customization_ids: dict.Dict(String, Bool), payment_terms: dict.Dict(String, types.PaymentTermsRecord), payment_terms_owner_ids: dict.Dict(String, Bool), payment_terms_by_owner_id: dict.Dict(String, String), deleted_payment_terms_ids: dict.Dict(String, Bool), store_credit_accounts: dict.Dict( String, types.StoreCreditAccountRecord, ), store_credit_account_transactions: dict.Dict( String, types.StoreCreditAccountTransactionRecord, ), customer_account_pages: dict.Dict( String, types.CustomerAccountPageRecord, ), customer_account_page_order: List(String), customer_data_erasure_requests: dict.Dict( String, types.CustomerDataErasureRequestRecord, ), merged_customer_ids: dict.Dict(String, String), customer_merge_requests: dict.Dict( String, types.CustomerMergeRequestRecord, ), segments: dict.Dict(String, types.SegmentRecord), segment_order: List(String), deleted_segment_ids: dict.Dict(String, Bool), customer_segment_members_queries: dict.Dict( String, types.CustomerSegmentMembersQueryRecord, ), customer_segment_members_query_order: List(String), shop_locales: dict.Dict(String, types.ShopLocaleRecord), deleted_shop_locales: dict.Dict(String, Bool), translations: dict.Dict(String, types.TranslationRecord), deleted_translations: dict.Dict(String, Bool), )
Long-lived runtime store. The TS class also tracks lagged search caches and a handful of cross-domain side tables; those will land when their domains do.
pub type Store {
Store(
base_state: BaseState,
staged_state: StagedState,
mutation_log: List(MutationLogEntry),
)
}
Constructors
-
Store( base_state: BaseState, staged_state: StagedState, mutation_log: List(MutationLogEntry), )
Values
pub fn cancel_staged_bulk_operation(
store: Store,
id: String,
) -> #(option.Option(types.BulkOperationRecord), Store)
Cancel only a staged operation, matching TS
cancelStagedBulkOperation.
pub fn delete_product_metafields_for_definition(
store: Store,
definition: types.MetafieldDefinitionRecord,
) -> Store
pub fn delete_staged_cart_transform(
store: Store,
id: String,
) -> Store
Mark a cart-transform id as deleted. Mirrors
deleteStagedCartTransform.
pub fn delete_staged_saved_search(
store: Store,
id: String,
) -> Store
Mark a saved-search id as deleted. Mirrors
deleteStagedSavedSearch.
pub fn delete_staged_segment(store: Store, id: String) -> Store
Mark a segment id as deleted. Mirrors deleteStagedSegment.
pub fn delete_staged_validation(
store: Store,
id: String,
) -> Store
Mark a validation id as deleted. Mirrors deleteStagedValidation.
pub fn delete_staged_webhook_subscription(
store: Store,
id: String,
) -> Store
Mark a webhook-subscription id as deleted. Mirrors
deleteStagedWebhookSubscription.
pub fn destroy_delegated_access_token(
store: Store,
id: String,
destroyed_at: String,
) -> Store
Mark a delegated access token destroyed. Mirrors
destroyDelegatedAccessToken.
pub fn disable_shop_locale(
store: Store,
locale: String,
) -> #(option.Option(types.ShopLocaleRecord), Store)
Mark a shop-locale as disabled. Mirrors disableShopLocale. Returns
the record that was previously effective (if any) so the caller can
build the mutation response payload.
pub fn empty_base_state() -> BaseState
An empty BaseState. Equivalent to cloneSnapshot(EMPTY_SNAPSHOT)
projected onto the slices we ship.
pub fn find_delegated_access_token_by_hash(
store: Store,
hash: String,
) -> option.Option(types.DelegatedAccessTokenRecord)
Find a delegated access token by sha256 hash. Mirrors
findDelegatedAccessTokenByHash. Searches staged before base.
pub fn find_effective_app_by_api_key(
store: Store,
api_key: String,
) -> option.Option(types.AppRecord)
Find an effective app whose api_key matches the given value.
Mirrors findEffectiveAppByApiKey.
pub fn find_effective_app_by_handle(
store: Store,
handle: String,
) -> option.Option(types.AppRecord)
Find an effective app whose handle matches the given value.
Mirrors findEffectiveAppByHandle. Staged wins on a tie.
pub fn find_effective_discount_by_code(
store: Store,
code: String,
) -> option.Option(types.DiscountRecord)
pub fn find_effective_inventory_level_by_id(
store: Store,
inventory_level_id: String,
) -> option.Option(types.InventoryLevelRecord)
pub fn find_effective_metafield_by_id(
store: Store,
metafield_id: String,
) -> option.Option(types.ProductMetafieldRecord)
pub fn find_effective_metafield_definition(
store: Store,
owner_type: String,
namespace: String,
key: String,
) -> option.Option(types.MetafieldDefinitionRecord)
pub fn find_effective_metaobject_by_handle(
store: Store,
type_: String,
handle: String,
) -> option.Option(types.MetaobjectRecord)
pub fn find_effective_metaobject_definition_by_type(
store: Store,
type_: String,
) -> option.Option(types.MetaobjectDefinitionRecord)
pub fn find_effective_variant_by_inventory_item_id(
store: Store,
inventory_item_id: String,
) -> option.Option(types.ProductVariantRecord)
pub fn get_abandoned_checkout_by_id(
store: Store,
id: String,
) -> option.Option(types.AbandonedCheckoutRecord)
pub fn get_abandonment_by_abandoned_checkout_id(
store: Store,
checkout_id: String,
) -> option.Option(types.AbandonmentRecord)
pub fn get_abandonment_by_id(
store: Store,
id: String,
) -> option.Option(types.AbandonmentRecord)
pub fn get_base_customer_catalog_connection(
store: Store,
key: String,
) -> option.Option(types.CustomerCatalogConnectionRecord)
pub fn get_base_segment_root_payload(
store: Store,
root_name: String,
) -> option.Option(types.StorePropertyValue)
pub fn get_base_variants_by_product_id(
store: Store,
product_id: String,
) -> List(types.ProductVariantRecord)
pub fn get_business_entity_by_id(
store: Store,
id: String,
) -> option.Option(types.StorePropertyRecord)
pub fn get_current_app_installation(
store: Store,
) -> option.Option(types.AppInstallationRecord)
Return the effective current installation, if one is registered.
Staged wins; falls back to base. Mirrors getCurrentAppInstallation.
pub fn get_customer_data_erasure_request(
store: Store,
customer_id: String,
) -> option.Option(types.CustomerDataErasureRequestRecord)
pub fn get_customer_merge_request(
store: Store,
job_id: String,
) -> option.Option(types.CustomerMergeRequestRecord)
pub fn get_draft_order_by_id(
store: Store,
id: String,
) -> option.Option(types.DraftOrderRecord)
pub fn get_draft_order_variant_catalog_by_id(
store: Store,
variant_id: String,
) -> option.Option(types.DraftOrderVariantCatalogRecord)
pub fn get_effective_admin_platform_generic_node_by_id(
store: Store,
id: String,
) -> option.Option(types.AdminPlatformGenericNodeRecord)
pub fn get_effective_admin_platform_taxonomy_category_by_id(
store: Store,
id: String,
) -> option.Option(types.AdminPlatformTaxonomyCategoryRecord)
pub fn get_effective_app_by_id(
store: Store,
id: String,
) -> option.Option(types.AppRecord)
Look up an effective app (staged-over-base). Mirrors
getEffectiveAppById.
pub fn get_effective_app_installation_by_id(
store: Store,
id: String,
) -> option.Option(types.AppInstallationRecord)
Look up an effective installation by id.
pub fn get_effective_app_one_time_purchase_by_id(
store: Store,
id: String,
) -> option.Option(types.AppOneTimePurchaseRecord)
Look up a one-time purchase by id.
pub fn get_effective_app_subscription_by_id(
store: Store,
id: String,
) -> option.Option(types.AppSubscriptionRecord)
Look up an effective subscription by id.
pub fn get_effective_app_subscription_line_item_by_id(
store: Store,
id: String,
) -> option.Option(types.AppSubscriptionLineItemRecord)
Look up a line item by id.
pub fn get_effective_app_usage_record_by_id(
store: Store,
id: String,
) -> option.Option(types.AppUsageRecord)
Look up a usage record by id.
pub fn get_effective_b2b_company_by_id(
store: Store,
id: String,
) -> option.Option(types.B2BCompanyRecord)
pub fn get_effective_b2b_company_contact_by_id(
store: Store,
id: String,
) -> option.Option(types.B2BCompanyContactRecord)
pub fn get_effective_b2b_company_contact_role_by_id(
store: Store,
id: String,
) -> option.Option(types.B2BCompanyContactRoleRecord)
pub fn get_effective_b2b_company_location_by_id(
store: Store,
id: String,
) -> option.Option(types.B2BCompanyLocationRecord)
pub fn get_effective_backup_region(
store: Store,
) -> option.Option(types.BackupRegionRecord)
Return the staged backup region when present, otherwise the seeded base region. The domain handler applies the no-shop captured fallback.
pub fn get_effective_bulk_operation_by_id(
store: Store,
id: String,
) -> option.Option(types.BulkOperationRecord)
pub fn get_effective_bulk_operation_result_jsonl(
store: Store,
id: String,
) -> option.Option(String)
pub fn get_effective_calculated_order_by_id(
store: Store,
id: String,
) -> option.Option(types.CalculatedOrderRecord)
pub fn get_effective_carrier_service_by_id(
store: Store,
id: String,
) -> option.Option(types.CarrierServiceRecord)
pub fn get_effective_cart_transform_by_id(
store: Store,
id: String,
) -> option.Option(types.CartTransformRecord)
Look up an effective cart-transform. Mirrors
getEffectiveCartTransformById.
pub fn get_effective_catalog_by_id(
store: Store,
id: String,
) -> option.Option(types.CatalogRecord)
pub fn get_effective_channel_by_id(
store: Store,
id: String,
) -> option.Option(types.ChannelRecord)
pub fn get_effective_collection_by_handle(
store: Store,
handle: String,
) -> option.Option(types.CollectionRecord)
pub fn get_effective_collection_by_id(
store: Store,
id: String,
) -> option.Option(types.CollectionRecord)
pub fn get_effective_customer_account_page_by_id(
store: Store,
page_id: String,
) -> option.Option(types.CustomerAccountPageRecord)
pub fn get_effective_customer_address_by_id(
store: Store,
address_id: String,
) -> option.Option(types.CustomerAddressRecord)
pub fn get_effective_customer_by_id(
store: Store,
customer_id: String,
) -> option.Option(types.CustomerRecord)
pub fn get_effective_customer_event_connection_page_info(
store: Store,
customer_id: String,
) -> option.Option(types.CustomerCatalogPageInfoRecord)
pub fn get_effective_customer_last_order(
store: Store,
customer_id: String,
) -> option.Option(types.CustomerOrderSummaryRecord)
pub fn get_effective_customer_order_connection_page_info(
store: Store,
customer_id: String,
) -> option.Option(types.CustomerCatalogPageInfoRecord)
pub fn get_effective_customer_order_summary_by_id(
store: Store,
order_id: String,
) -> option.Option(types.CustomerOrderSummaryRecord)
pub fn get_effective_customer_payment_method_by_id(
store: Store,
payment_method_id: String,
show_revoked: Bool,
) -> option.Option(types.CustomerPaymentMethodRecord)
pub fn get_effective_customer_segment_members_query_by_id(
store: Store,
id: String,
) -> option.Option(types.CustomerSegmentMembersQueryRecord)
Look up the effective customer-segment-members-query for an id.
Staged wins over base. Mirrors
getEffectiveCustomerSegmentMembersQueryById.
pub fn get_effective_delivery_profile_by_id(
store: Store,
id: String,
) -> option.Option(types.DeliveryProfileRecord)
pub fn get_effective_discount_by_id(
store: Store,
id: String,
) -> option.Option(types.DiscountRecord)
pub fn get_effective_file_by_id(
store: Store,
file_id: String,
) -> option.Option(types.FileRecord)
pub fn get_effective_fulfillment_by_id(
store: Store,
id: String,
) -> option.Option(types.FulfillmentRecord)
pub fn get_effective_fulfillment_order_by_id(
store: Store,
id: String,
) -> option.Option(types.FulfillmentOrderRecord)
pub fn get_effective_fulfillment_service_by_id(
store: Store,
id: String,
) -> option.Option(types.FulfillmentServiceRecord)
pub fn get_effective_gift_card_by_id(
store: Store,
id: String,
) -> option.Option(types.GiftCardRecord)
Look up the effective gift card for an id (staged-over-base).
Mirrors getEffectiveGiftCardById.
pub fn get_effective_gift_card_configuration(
store: Store,
) -> types.GiftCardConfigurationRecord
Read the effective gift-card configuration (staged-over-base).
Mirrors getEffectiveGiftCardConfiguration. Returns the proxy’s
default (CAD 0.0 limits) when neither side has staged a
configuration — matches the TS fallback.
pub fn get_effective_inventory_shipment_by_id(
store: Store,
shipment_id: String,
) -> option.Option(types.InventoryShipmentRecord)
pub fn get_effective_inventory_transfer_by_id(
store: Store,
transfer_id: String,
) -> option.Option(types.InventoryTransferRecord)
pub fn get_effective_location_by_id(
store: Store,
id: String,
) -> option.Option(types.LocationRecord)
pub fn get_effective_market_by_id(
store: Store,
id: String,
) -> option.Option(types.MarketRecord)
pub fn get_effective_marketing_activity_by_remote_id(
store: Store,
remote_id: String,
) -> option.Option(types.MarketingRecord)
pub fn get_effective_marketing_activity_record_by_id(
store: Store,
id: String,
) -> option.Option(types.MarketingRecord)
pub fn get_effective_marketing_event_record_by_id(
store: Store,
id: String,
) -> option.Option(types.MarketingRecord)
pub fn get_effective_markets_root_payload(
store: Store,
key: String,
) -> option.Option(types.CapturedJsonValue)
pub fn get_effective_media_by_product_id(
store: Store,
product_id: String,
) -> List(types.ProductMediaRecord)
pub fn get_effective_metafield_definition_by_id(
store: Store,
definition_id: String,
) -> option.Option(types.MetafieldDefinitionRecord)
pub fn get_effective_metafields_by_customer_id(
store: Store,
customer_id: String,
) -> List(types.CustomerMetafieldRecord)
pub fn get_effective_metafields_by_owner_id(
store: Store,
owner_id: String,
) -> List(types.ProductMetafieldRecord)
pub fn get_effective_metaobject_by_id(
store: Store,
id: String,
) -> option.Option(types.MetaobjectRecord)
pub fn get_effective_metaobject_definition_by_id(
store: Store,
id: String,
) -> option.Option(types.MetaobjectDefinitionRecord)
pub fn get_effective_online_store_content_by_id(
store: Store,
id: String,
) -> option.Option(types.OnlineStoreContentRecord)
pub fn get_effective_online_store_integration_by_id(
store: Store,
id: String,
) -> option.Option(types.OnlineStoreIntegrationRecord)
pub fn get_effective_options_by_product_id(
store: Store,
product_id: String,
) -> List(types.ProductOptionRecord)
pub fn get_effective_payment_customization_by_id(
store: Store,
id: String,
) -> option.Option(types.PaymentCustomizationRecord)
pub fn get_effective_payment_terms_by_id(
store: Store,
id: String,
) -> option.Option(types.PaymentTermsRecord)
pub fn get_effective_payment_terms_by_owner_id(
store: Store,
owner_id: String,
) -> option.Option(types.PaymentTermsRecord)
pub fn get_effective_price_list_by_id(
store: Store,
id: String,
) -> option.Option(types.PriceListRecord)
pub fn get_effective_product_by_handle(
store: Store,
handle: String,
) -> option.Option(types.ProductRecord)
pub fn get_effective_product_by_id(
store: Store,
id: String,
) -> option.Option(types.ProductRecord)
pub fn get_effective_product_count(store: Store) -> Int
pub fn get_effective_product_feed_by_id(
store: Store,
id: String,
) -> option.Option(types.ProductFeedRecord)
pub fn get_effective_product_operation_by_id(
store: Store,
id: String,
) -> option.Option(types.ProductOperationRecord)
pub fn get_effective_product_option_by_id(
store: Store,
option_id: String,
) -> option.Option(types.ProductOptionRecord)
pub fn get_effective_product_option_value_by_id(
store: Store,
option_value_id: String,
) -> option.Option(types.ProductOptionValueRecord)
pub fn get_effective_product_resource_feedback(
store: Store,
product_id: String,
) -> option.Option(types.ProductResourceFeedbackRecord)
pub fn get_effective_product_variant_count(store: Store) -> Int
pub fn get_effective_publication_by_id(
store: Store,
id: String,
) -> option.Option(types.PublicationRecord)
pub fn get_effective_publishable_by_id(
store: Store,
id: String,
) -> option.Option(types.StorePropertyRecord)
pub fn get_effective_reverse_delivery_by_id(
store: Store,
id: String,
) -> option.Option(types.ReverseDeliveryRecord)
pub fn get_effective_reverse_fulfillment_order_by_id(
store: Store,
id: String,
) -> option.Option(types.ReverseFulfillmentOrderRecord)
pub fn get_effective_saved_search_by_id(
store: Store,
id: String,
) -> option.Option(types.SavedSearchRecord)
Look up the effective saved search for an id. Staged wins over base;
any “deleted” marker on either side suppresses the record.
Mirrors getEffectiveSavedSearchById.
pub fn get_effective_segment_by_id(
store: Store,
id: String,
) -> option.Option(types.SegmentRecord)
Look up the effective segment for an id. Staged wins over base; any
“deleted” marker on either side suppresses the record. Mirrors
getEffectiveSegmentById.
pub fn get_effective_selling_plan_group_by_id(
store: Store,
id: String,
) -> option.Option(types.SellingPlanGroupRecord)
pub fn get_effective_shipping_order_by_id(
store: Store,
id: String,
) -> option.Option(types.ShippingOrderRecord)
pub fn get_effective_shipping_package_by_id(
store: Store,
id: String,
) -> option.Option(types.ShippingPackageRecord)
pub fn get_effective_shop(
store: Store,
) -> option.Option(types.ShopRecord)
pub fn get_effective_shop_locale(
store: Store,
locale: String,
) -> option.Option(types.ShopLocaleRecord)
Look up the effective shop-locale for a locale code. Staged wins
over base; any “deleted” marker on the staged side suppresses the
record. Mirrors getEffectiveShopLocale.
pub fn get_effective_shopify_function_by_id(
store: Store,
id: String,
) -> option.Option(types.ShopifyFunctionRecord)
Look up an effective ShopifyFunctionRecord (staged-over-base).
Mirrors getEffectiveShopifyFunctionById.
pub fn get_effective_store_credit_account_by_id(
store: Store,
account_id: String,
) -> option.Option(types.StoreCreditAccountRecord)
pub fn get_effective_store_property_location_by_id(
store: Store,
id: String,
) -> option.Option(types.StorePropertyRecord)
pub fn get_effective_tax_app_configuration(
store: Store,
) -> option.Option(types.TaxAppConfigurationRecord)
Read the effective tax-app configuration (staged-over-base).
Mirrors getEffectiveTaxAppConfiguration.
pub fn get_effective_validation_by_id(
store: Store,
id: String,
) -> option.Option(types.ValidationRecord)
Look up an effective validation. Mirrors
getEffectiveValidationById.
pub fn get_effective_variant_by_id(
store: Store,
variant_id: String,
) -> option.Option(types.ProductVariantRecord)
pub fn get_effective_variants_by_product_id(
store: Store,
product_id: String,
) -> List(types.ProductVariantRecord)
pub fn get_effective_web_presence_by_id(
store: Store,
id: String,
) -> option.Option(types.WebPresenceRecord)
pub fn get_effective_webhook_subscription_by_id(
store: Store,
id: String,
) -> option.Option(types.WebhookSubscriptionRecord)
Look up the effective webhook subscription for an id. Staged wins
over base; any “deleted” marker on either side suppresses the record.
Mirrors getEffectiveWebhookSubscriptionById.
pub fn get_log(store: Store) -> List(MutationLogEntry)
Read the mutation log in insertion order. Mirrors getLog.
pub fn get_order_by_id(
store: Store,
id: String,
) -> option.Option(types.OrderRecord)
pub fn get_order_mandate_payment(
store: Store,
order_id: String,
idempotency_key: String,
) -> option.Option(types.OrderMandatePaymentRecord)
pub fn get_staged_bulk_operation_by_id(
store: Store,
id: String,
) -> option.Option(types.BulkOperationRecord)
pub fn get_staged_upload_content(
store: Store,
staged_upload_path: String,
) -> option.Option(String)
pub fn get_store_property_mutation_payload(
store: Store,
key: String,
) -> option.Option(types.StorePropertyMutationPayloadRecord)
pub fn has_bulk_operations(store: Store) -> Bool
pub fn has_effective_file_by_id(
store: Store,
file_id: String,
) -> Bool
pub fn has_effective_metaobjects(store: Store) -> Bool
pub fn has_known_marketing_channel_handle(
store: Store,
handle: String,
) -> Bool
pub fn has_localization_state(store: Store) -> Bool
True if the store contains any localization state. Mirrors
hasLocalizationState. Used by the meta-state serializer (not yet
ported on the Gleam side); kept here for parity.
pub fn has_payment_customizations(store: Store) -> Bool
pub fn has_staged_bulk_operations(store: Store) -> Bool
pub fn has_staged_delivery_profiles(store: Store) -> Bool
pub fn has_staged_marketing_records(store: Store) -> Bool
pub fn list_effective_abandoned_checkouts(
store: Store,
) -> List(types.AbandonedCheckoutRecord)
pub fn list_effective_abandonments(
store: Store,
) -> List(types.AbandonmentRecord)
pub fn list_effective_admin_platform_taxonomy_categories(
store: Store,
) -> List(types.AdminPlatformTaxonomyCategoryRecord)
pub fn list_effective_app_usage_records_for_line_item(
store: Store,
line_item_id: String,
) -> List(types.AppUsageRecord)
List every effective usage record attached to a given line item.
Mirrors listEffectiveAppUsageRecordsForLineItem. Staged-over-base.
pub fn list_effective_apps(store: Store) -> List(types.AppRecord)
List every effective app. Mirrors the implicit pattern of
listEffectiveApps (TS doesn’t expose one but the same merge rules
apply).
pub fn list_effective_available_locales(
store: Store,
) -> List(types.LocaleRecord)
Read the catalog of every locale Shopify recognises. Mirrors
listEffectiveAvailableLocales. Empty when no upstream response
has hydrated it; the localization handler falls back to its own
hardcoded default catalog in that case.
pub fn list_effective_b2b_companies(
store: Store,
) -> List(types.B2BCompanyRecord)
pub fn list_effective_b2b_company_contacts(
store: Store,
) -> List(types.B2BCompanyContactRecord)
pub fn list_effective_b2b_company_locations(
store: Store,
) -> List(types.B2BCompanyLocationRecord)
pub fn list_effective_bulk_operations(
store: Store,
) -> List(types.BulkOperationRecord)
List effective BulkOperations. Ordered ids from base+staged come first, then unordered ids sorted by createdAt descending / id ascending, matching the TS store helper.
pub fn list_effective_business_entities(
store: Store,
) -> List(types.StorePropertyRecord)
pub fn list_effective_carrier_services(
store: Store,
) -> List(types.CarrierServiceRecord)
pub fn list_effective_cart_transforms(
store: Store,
) -> List(types.CartTransformRecord)
List every effective cart-transform. Mirrors
listEffectiveCartTransforms.
pub fn list_effective_catalogs(
store: Store,
) -> List(types.CatalogRecord)
pub fn list_effective_channels(
store: Store,
) -> List(types.ChannelRecord)
pub fn list_effective_collections(
store: Store,
) -> List(types.CollectionRecord)
pub fn list_effective_collections_for_product(
store: Store,
product_id: String,
) -> List(
#(types.CollectionRecord, types.ProductCollectionRecord),
)
pub fn list_effective_customer_account_pages(
store: Store,
) -> List(types.CustomerAccountPageRecord)
pub fn list_effective_customer_addresses(
store: Store,
customer_id: String,
) -> List(types.CustomerAddressRecord)
pub fn list_effective_customer_event_summaries(
store: Store,
customer_id: String,
) -> List(types.CustomerEventSummaryRecord)
pub fn list_effective_customer_order_summaries(
store: Store,
customer_id: String,
) -> List(types.CustomerOrderSummaryRecord)
pub fn list_effective_customer_payment_methods(
store: Store,
customer_id: String,
show_revoked: Bool,
) -> List(types.CustomerPaymentMethodRecord)
pub fn list_effective_customers(
store: Store,
) -> List(types.CustomerRecord)
pub fn list_effective_delivery_profiles(
store: Store,
) -> List(types.DeliveryProfileRecord)
pub fn list_effective_discounts(
store: Store,
) -> List(types.DiscountRecord)
pub fn list_effective_draft_orders(
store: Store,
) -> List(types.DraftOrderRecord)
pub fn list_effective_files(
store: Store,
) -> List(types.FileRecord)
pub fn list_effective_fulfillment_orders(
store: Store,
) -> List(types.FulfillmentOrderRecord)
pub fn list_effective_fulfillment_services(
store: Store,
) -> List(types.FulfillmentServiceRecord)
pub fn list_effective_fulfillments(
store: Store,
) -> List(types.FulfillmentRecord)
pub fn list_effective_gift_cards(
store: Store,
) -> List(types.GiftCardRecord)
List every effective gift card. Mirrors listEffectiveGiftCards.
Ordered records first (giftCardOrder), then any unordered records
sorted by id.
pub fn list_effective_inventory_shipments(
store: Store,
) -> List(types.InventoryShipmentRecord)
pub fn list_effective_inventory_transfers(
store: Store,
) -> List(types.InventoryTransferRecord)
pub fn list_effective_locations(
store: Store,
) -> List(types.LocationRecord)
pub fn list_effective_marketing_activities(
store: Store,
) -> List(types.MarketingRecord)
pub fn list_effective_marketing_engagements(
store: Store,
) -> List(types.MarketingEngagementRecord)
pub fn list_effective_marketing_events(
store: Store,
) -> List(types.MarketingRecord)
pub fn list_effective_markets(
store: Store,
) -> List(types.MarketRecord)
pub fn list_effective_metafield_definitions(
store: Store,
) -> List(types.MetafieldDefinitionRecord)
pub fn list_effective_metaobject_definitions(
store: Store,
) -> List(types.MetaobjectDefinitionRecord)
pub fn list_effective_metaobjects(
store: Store,
) -> List(types.MetaobjectRecord)
pub fn list_effective_metaobjects_by_type(
store: Store,
type_: String,
) -> List(types.MetaobjectRecord)
pub fn list_effective_online_store_content(
store: Store,
kind: String,
) -> List(types.OnlineStoreContentRecord)
pub fn list_effective_online_store_integrations(
store: Store,
kind: String,
) -> List(types.OnlineStoreIntegrationRecord)
pub fn list_effective_orders(
store: Store,
) -> List(types.OrderRecord)
pub fn list_effective_payment_customizations(
store: Store,
) -> List(types.PaymentCustomizationRecord)
pub fn list_effective_price_lists(
store: Store,
) -> List(types.PriceListRecord)
pub fn list_effective_product_feeds(
store: Store,
) -> List(types.ProductFeedRecord)
pub fn list_effective_product_media(
store: Store,
) -> List(types.ProductMediaRecord)
pub fn list_effective_product_variants(
store: Store,
) -> List(types.ProductVariantRecord)
pub fn list_effective_products(
store: Store,
) -> List(types.ProductRecord)
pub fn list_effective_products_for_collection(
store: Store,
collection_id: String,
) -> List(#(types.ProductRecord, types.ProductCollectionRecord))
pub fn list_effective_publications(
store: Store,
) -> List(types.PublicationRecord)
pub fn list_effective_reverse_deliveries(
store: Store,
) -> List(types.ReverseDeliveryRecord)
pub fn list_effective_reverse_fulfillment_orders(
store: Store,
) -> List(types.ReverseFulfillmentOrderRecord)
pub fn list_effective_saved_searches(
store: Store,
) -> List(types.SavedSearchRecord)
List every effective saved search the store knows about. Mirrors
listEffectiveSavedSearches. Ordered records (those tracked by the
savedSearchOrder arrays) come first, followed by any unordered
staged/base records sorted by id.
pub fn list_effective_segments(
store: Store,
) -> List(types.SegmentRecord)
List every effective segment the store knows about. Ordered records
(those tracked by segmentOrder) come first, followed by any
unordered staged/base records sorted by id. Mirrors
listEffectiveSegments.
pub fn list_effective_selling_plan_groups(
store: Store,
) -> List(types.SellingPlanGroupRecord)
pub fn list_effective_selling_plan_groups_for_product(
store: Store,
product_id: String,
) -> List(types.SellingPlanGroupRecord)
pub fn list_effective_selling_plan_groups_for_product_variant(
store: Store,
variant_id: String,
) -> List(types.SellingPlanGroupRecord)
pub fn list_effective_selling_plan_groups_visible_for_product(
store: Store,
product_id: String,
) -> List(types.SellingPlanGroupRecord)
pub fn list_effective_selling_plan_groups_visible_for_product_variant(
store: Store,
variant_id: String,
) -> List(types.SellingPlanGroupRecord)
pub fn list_effective_shipping_packages(
store: Store,
) -> List(types.ShippingPackageRecord)
pub fn list_effective_shop_locales(
store: Store,
published: option.Option(Bool),
) -> List(types.ShopLocaleRecord)
List every effective shop locale. Optionally filter by published.
Sort: primary locale first, then by locale code. Mirrors
listEffectiveShopLocales.
pub fn list_effective_shopify_functions(
store: Store,
) -> List(types.ShopifyFunctionRecord)
List every effective ShopifyFunctionRecord. Mirrors
listEffectiveShopifyFunctions. Ordered records first, then any
unordered ones sorted by id.
pub fn list_effective_store_credit_account_transactions(
store: Store,
account_id: String,
) -> List(types.StoreCreditAccountTransactionRecord)
pub fn list_effective_store_credit_accounts_for_customer(
store: Store,
customer_id: String,
) -> List(types.StoreCreditAccountRecord)
pub fn list_effective_store_property_locations(
store: Store,
) -> List(types.StorePropertyRecord)
pub fn list_effective_translations(
store: Store,
resource_id: String,
locale: String,
market_id: option.Option(String),
) -> List(types.TranslationRecord)
List the effective translations for a (resource_id, locale, market_id)
triple. Mirrors listEffectiveTranslations. Sort: by key, then
updated_at.
pub fn list_effective_validations(
store: Store,
) -> List(types.ValidationRecord)
List every effective validation. Mirrors listEffectiveValidations.
pub fn list_effective_web_presences(
store: Store,
) -> List(types.WebPresenceRecord)
pub fn list_effective_webhook_subscriptions(
store: Store,
) -> List(types.WebhookSubscriptionRecord)
List every effective webhook subscription the store knows about.
Mirrors listEffectiveWebhookSubscriptions. Ordered records (those
tracked by the webhookSubscriptionOrder arrays) come first,
followed by any unordered staged/base records sorted by id.
pub fn payment_terms_owner_exists(
store: Store,
owner_id: String,
) -> Bool
pub fn record_mutation_log_entry(
store: Store,
entry: MutationLogEntry,
) -> Store
Append a mutation log entry. Mirrors recordMutationLogEntry.
pub fn remove_translation(
store: Store,
resource_id: String,
locale: String,
key: String,
market_id: option.Option(String),
) -> #(option.Option(types.TranslationRecord), Store)
Remove a translation. Returns the record that was effective before
removal (if any). Mirrors removeTranslation.
pub fn remove_translations_for_locale(
store: Store,
locale: String,
) -> #(List(types.TranslationRecord), Store)
Remove every translation registered against a given locale. Returns
the records that were effective before removal, sorted by
(resource_id, key, updated_at). Mirrors removeTranslationsForLocale.
pub fn replace_base_available_locales(
store: Store,
locales: List(types.LocaleRecord),
) -> Store
Replace the entire availableLocales catalog. Mirrors
replaceBaseAvailableLocales. The TS handler hydrates this from
upstream responses; the Gleam port only ever sees it via tests
today, but keeping the helper surface intact unblocks future
hydration work.
pub fn replace_base_media_for_product(
store: Store,
product_id: String,
media: List(types.ProductMediaRecord),
) -> Store
pub fn replace_base_metafields_for_owner(
store: Store,
owner_id: String,
metafields: List(types.ProductMetafieldRecord),
) -> Store
pub fn replace_base_options_for_product(
store: Store,
product_id: String,
options: List(types.ProductOptionRecord),
) -> Store
pub fn replace_base_products_for_collection(
store: Store,
collection_id: String,
records: List(types.ProductCollectionRecord),
) -> Store
pub fn replace_staged_collections_for_product(
store: Store,
product_id: String,
records: List(types.ProductCollectionRecord),
) -> Store
pub fn replace_staged_media_for_product(
store: Store,
product_id: String,
media: List(types.ProductMediaRecord),
) -> Store
pub fn replace_staged_metafields_for_owner(
store: Store,
owner_id: String,
metafields: List(types.ProductMetafieldRecord),
) -> Store
pub fn replace_staged_options_for_product(
store: Store,
product_id: String,
options: List(types.ProductOptionRecord),
) -> Store
pub fn replace_staged_variants_for_product(
store: Store,
product_id: String,
variants: List(types.ProductVariantRecord),
) -> Store
pub fn reset(store: Store) -> Store
Reset both base and staged state plus the mutation log. Mirrors
reset() (which calls restoreInitialState() against an empty
snapshot — equivalent to a fresh store for the slices we ship).
pub fn set_base_customer_catalog_connection(
store: Store,
key: String,
connection: types.CustomerCatalogConnectionRecord,
) -> Store
pub fn set_base_customer_event_connection_page_info(
store: Store,
customer_id: String,
page_info: types.CustomerCatalogPageInfoRecord,
) -> Store
pub fn set_base_customer_order_connection_page_info(
store: Store,
customer_id: String,
page_info: types.CustomerCatalogPageInfoRecord,
) -> Store
pub fn set_base_segment_root_payload(
store: Store,
root_name: String,
payload: types.StorePropertyValue,
) -> Store
pub fn set_staged_gift_card_configuration(
store: Store,
record: types.GiftCardConfigurationRecord,
) -> Store
Stage the singleton gift-card configuration. Mirrors
setStagedGiftCardConfiguration.
pub fn set_staged_tax_app_configuration(
store: Store,
record: types.TaxAppConfigurationRecord,
) -> Store
Stage the singleton tax-app configuration. Mirrors
setStagedTaxAppConfiguration. The TS proxy permits one
configuration per shop; here it lives as Option on staged state.
pub fn stage_abandonment_delivery_activity(
store: Store,
abandonment_id: String,
activity: types.AbandonmentDeliveryActivityRecord,
) -> #(Store, option.Option(types.AbandonmentRecord))
pub fn stage_admin_platform_flow_signature(
store: Store,
record: types.AdminPlatformFlowSignatureRecord,
) -> #(types.AdminPlatformFlowSignatureRecord, Store)
Stage a local Flow signature audit record.
pub fn stage_admin_platform_flow_trigger(
store: Store,
record: types.AdminPlatformFlowTriggerRecord,
) -> #(types.AdminPlatformFlowTriggerRecord, Store)
Stage a local Flow trigger receipt audit record.
pub fn stage_app(
store: Store,
record: types.AppRecord,
) -> #(types.AppRecord, Store)
Stage an AppRecord. The TS handler calls stageApp when it mints
a default app for a fresh proxy. Returns the record (unchanged in
Gleam since values are already immutable) alongside the new store.
pub fn stage_app_installation(
store: Store,
record: types.AppInstallationRecord,
) -> #(types.AppInstallationRecord, Store)
Stage an installation. Mirrors stageAppInstallation. If no
installation is registered as current, the new one becomes current.
pub fn stage_app_one_time_purchase(
store: Store,
record: types.AppOneTimePurchaseRecord,
) -> #(types.AppOneTimePurchaseRecord, Store)
Stage an AppOneTimePurchaseRecord. Mirrors
stageAppOneTimePurchase.
pub fn stage_app_subscription(
store: Store,
record: types.AppSubscriptionRecord,
) -> #(types.AppSubscriptionRecord, Store)
Stage an AppSubscriptionRecord. Mirrors stageAppSubscription.
pub fn stage_app_subscription_line_item(
store: Store,
record: types.AppSubscriptionLineItemRecord,
) -> #(types.AppSubscriptionLineItemRecord, Store)
Stage an AppSubscriptionLineItemRecord. Mirrors
stageAppSubscriptionLineItem.
pub fn stage_app_usage_record(
store: Store,
record: types.AppUsageRecord,
) -> #(types.AppUsageRecord, Store)
Stage an AppUsageRecord. Mirrors stageAppUsageRecord.
pub fn stage_backup_region(
store: Store,
record: types.BackupRegionRecord,
) -> #(types.BackupRegionRecord, Store)
Stage the shop backup region. Mirrors stageBackupRegion.
pub fn stage_bulk_operation(
store: Store,
record: types.BulkOperationRecord,
) -> #(types.BulkOperationRecord, Store)
Stage a BulkOperation record. Mirrors stageBulkOperation.
pub fn stage_bulk_operation_result(
store: Store,
record: types.BulkOperationRecord,
jsonl: String,
) -> #(types.BulkOperationRecord, Store)
Stage a BulkOperation and its generated result JSONL. The TS store
keeps result payloads in a sibling bulkOperationResults map; in
Gleam the not-yet-exposed result payload lives on the record.
pub fn stage_create_carrier_service(
store: Store,
service: types.CarrierServiceRecord,
) -> #(types.CarrierServiceRecord, Store)
pub fn stage_create_customer(
store: Store,
record: types.CustomerRecord,
) -> #(types.CustomerRecord, Store)
pub fn stage_create_delivery_profile(
store: Store,
profile: types.DeliveryProfileRecord,
) -> #(types.DeliveryProfileRecord, Store)
pub fn stage_create_fulfillment_service(
store: Store,
service: types.FulfillmentServiceRecord,
) -> #(types.FulfillmentServiceRecord, Store)
pub fn stage_create_gift_card(
store: Store,
record: types.GiftCardRecord,
) -> #(types.GiftCardRecord, Store)
Stage a freshly minted GiftCardRecord. Mirrors
stageCreateGiftCard — appends the id to staged order on first
sight, otherwise leaves the order alone (idempotent re-stage).
pub fn stage_customer_data_erasure_request(
store: Store,
request: types.CustomerDataErasureRequestRecord,
) -> Store
pub fn stage_customer_metafields(
store: Store,
customer_id: String,
records: List(types.CustomerMetafieldRecord),
) -> Store
pub fn stage_customer_order_summary(
store: Store,
record: types.CustomerOrderSummaryRecord,
) -> Store
pub fn stage_customer_payment_method(
store: Store,
record: types.CustomerPaymentMethodRecord,
) -> Store
pub fn stage_customer_payment_method_update_url(
store: Store,
record: types.CustomerPaymentMethodUpdateUrlRecord,
) -> Store
pub fn stage_customer_segment_members_query(
store: Store,
record: types.CustomerSegmentMembersQueryRecord,
) -> Store
Stage a customer-segment-members-query record. Mirrors
stageCustomerSegmentMembersQuery.
pub fn stage_delegated_access_token(
store: Store,
record: types.DelegatedAccessTokenRecord,
) -> #(types.DelegatedAccessTokenRecord, Store)
Stage a delegated access token. Mirrors stageDelegatedAccessToken.
pub fn stage_delete_marketing_engagements_by_channel_handle(
store: Store,
channel_handle: String,
) -> #(List(String), Store)
pub fn stage_discount(
store: Store,
record: types.DiscountRecord,
) -> #(types.DiscountRecord, Store)
pub fn stage_discount_bulk_operation(
store: Store,
record: types.DiscountBulkOperationRecord,
) -> #(types.DiscountBulkOperationRecord, Store)
pub fn stage_draft_order(
store: Store,
record: types.DraftOrderRecord,
) -> Store
pub fn stage_marketing_activity(
store: Store,
record: types.MarketingRecord,
) -> #(types.MarketingRecord, Store)
pub fn stage_marketing_engagement(
store: Store,
record: types.MarketingEngagementRecord,
) -> #(types.MarketingEngagementRecord, Store)
pub fn stage_marketing_event(
store: Store,
record: types.MarketingRecord,
) -> #(types.MarketingRecord, Store)
pub fn stage_merge_customers(
store: Store,
source_customer_id: String,
resulting_customer: types.CustomerRecord,
merge_request: types.CustomerMergeRequestRecord,
) -> Store
pub fn stage_order(
store: Store,
record: types.OrderRecord,
) -> Store
pub fn stage_payment_reminder_send(
store: Store,
record: types.PaymentReminderSendRecord,
) -> Store
pub fn stage_product_operation(
store: Store,
operation: types.ProductOperationRecord,
) -> #(types.ProductOperationRecord, Store)
pub fn stage_shop(
store: Store,
record: types.ShopRecord,
) -> #(types.ShopRecord, Store)
pub fn stage_shop_locale(
store: Store,
record: types.ShopLocaleRecord,
) -> #(types.ShopLocaleRecord, Store)
Stage a shop-locale record. Mirrors stageShopLocale.
pub fn stage_staged_upload_content(
store: Store,
staged_upload_path: String,
content: String,
) -> Store
Record staged-upload content for local bulk mutation imports. The HTTP staged-upload route is still TS-only, so Gleam tests seed this directly.
pub fn stage_store_credit_account(
store: Store,
record: types.StoreCreditAccountRecord,
) -> Store
pub fn stage_store_credit_account_transaction(
store: Store,
record: types.StoreCreditAccountTransactionRecord,
) -> Store
pub fn stage_translation(
store: Store,
record: types.TranslationRecord,
) -> #(types.TranslationRecord, Store)
Stage a translation record. Mirrors stageTranslation.
pub fn stage_update_carrier_service(
store: Store,
service: types.CarrierServiceRecord,
) -> #(types.CarrierServiceRecord, Store)
pub fn stage_update_customer(
store: Store,
record: types.CustomerRecord,
) -> #(types.CustomerRecord, Store)
pub fn stage_update_delivery_profile(
store: Store,
profile: types.DeliveryProfileRecord,
) -> #(types.DeliveryProfileRecord, Store)
pub fn stage_update_fulfillment_service(
store: Store,
service: types.FulfillmentServiceRecord,
) -> #(types.FulfillmentServiceRecord, Store)
pub fn stage_update_gift_card(
store: Store,
record: types.GiftCardRecord,
) -> #(types.GiftCardRecord, Store)
Stage an updated GiftCardRecord. Mirrors stageUpdateGiftCard.
Same semantics as stage_create_gift_card since gift cards are
never deleted (deactivation flips a flag instead).
pub fn stage_update_shipping_package(
store: Store,
shipping_package: types.ShippingPackageRecord,
) -> #(types.ShippingPackageRecord, Store)
pub fn stage_upsert_calculated_order(
store: Store,
record: types.CalculatedOrderRecord,
) -> #(types.CalculatedOrderRecord, Store)
pub fn stage_upsert_customer_address(
store: Store,
record: types.CustomerAddressRecord,
) -> #(types.CustomerAddressRecord, Store)
pub fn stage_upsert_fulfillment(
store: Store,
fulfillment: types.FulfillmentRecord,
) -> #(types.FulfillmentRecord, Store)
pub fn stage_upsert_fulfillment_order(
store: Store,
fulfillment_order: types.FulfillmentOrderRecord,
) -> #(types.FulfillmentOrderRecord, Store)
pub fn stage_upsert_reverse_delivery(
store: Store,
record: types.ReverseDeliveryRecord,
) -> #(types.ReverseDeliveryRecord, Store)
pub fn stage_upsert_reverse_fulfillment_order(
store: Store,
record: types.ReverseFulfillmentOrderRecord,
) -> #(types.ReverseFulfillmentOrderRecord, Store)
pub fn stage_upsert_shipping_order(
store: Store,
order: types.ShippingOrderRecord,
) -> #(types.ShippingOrderRecord, Store)
pub fn translation_storage_key(
resource_id: String,
locale: String,
key: String,
market_id: option.Option(String),
) -> String
Build the storage key used to address a translation:
<resource_id>::<locale>::<market_id?>::<key>. Mirrors
translationStorageKey.
pub fn update_log_entry(
store: Store,
id: String,
status: EntryStatus,
notes: option.Option(String),
) -> Store
Update the status and notes of a single log entry, looked up by id.
Mirrors InMemoryStore.updateLogEntry — used by the commit path to
flip entries from Staged to Committed or Failed and stamp the
reason. A no-op when no entry matches the id.
pub fn upsert_base_abandoned_checkouts(
store: Store,
records: List(types.AbandonedCheckoutRecord),
) -> Store
pub fn upsert_base_abandonments(
store: Store,
records: List(types.AbandonmentRecord),
) -> Store
pub fn upsert_base_admin_platform_generic_nodes(
store: Store,
records: List(types.AdminPlatformGenericNodeRecord),
) -> Store
pub fn upsert_base_admin_platform_taxonomy_categories(
store: Store,
records: List(types.AdminPlatformTaxonomyCategoryRecord),
) -> Store
pub fn upsert_base_app(
store: Store,
record: types.AppRecord,
) -> Store
Upsert an AppRecord into the base state. Used by hydration to seed
upstream-known apps. Mirrors upsertBaseAppInstallation (the app
half) and the implicit “stage app” the TS uses when the proxy mints
its own.
pub fn upsert_base_app_installation(
store: Store,
installation: types.AppInstallationRecord,
app: types.AppRecord,
) -> Store
Upsert an installation + its app together. Mirrors
upsertBaseAppInstallation, which atomically writes both to base.
pub fn upsert_base_b2b_company(
store: Store,
record: types.B2BCompanyRecord,
) -> Store
pub fn upsert_base_b2b_company_contact(
store: Store,
record: types.B2BCompanyContactRecord,
) -> Store
pub fn upsert_base_b2b_company_contact_role(
store: Store,
record: types.B2BCompanyContactRoleRecord,
) -> Store
pub fn upsert_base_b2b_company_location(
store: Store,
record: types.B2BCompanyLocationRecord,
) -> Store
pub fn upsert_base_backup_region(
store: Store,
record: types.BackupRegionRecord,
) -> Store
Seed or update the captured/effective backup region in base state.
pub fn upsert_base_bulk_operations(
store: Store,
records: List(types.BulkOperationRecord),
) -> Store
Upsert BulkOperation records into base state. Mirrors
upsertBaseBulkOperations.
pub fn upsert_base_business_entity(
store: Store,
record: types.StorePropertyRecord,
) -> Store
pub fn upsert_base_calculated_orders(
store: Store,
records: List(types.CalculatedOrderRecord),
) -> Store
pub fn upsert_base_carrier_services(
store: Store,
services: List(types.CarrierServiceRecord),
) -> Store
pub fn upsert_base_catalogs(
store: Store,
records: List(types.CatalogRecord),
) -> Store
pub fn upsert_base_channels(
store: Store,
records: List(types.ChannelRecord),
) -> Store
pub fn upsert_base_collections(
store: Store,
records: List(types.CollectionRecord),
) -> Store
pub fn upsert_base_customer_account_pages(
store: Store,
records: List(types.CustomerAccountPageRecord),
) -> Store
pub fn upsert_base_customer_addresses(
store: Store,
records: List(types.CustomerAddressRecord),
) -> Store
pub fn upsert_base_customer_event_summaries(
store: Store,
records: List(types.CustomerEventSummaryRecord),
) -> Store
pub fn upsert_base_customer_last_orders(
store: Store,
records: List(#(String, types.CustomerOrderSummaryRecord)),
) -> Store
pub fn upsert_base_customer_order_summaries(
store: Store,
records: List(types.CustomerOrderSummaryRecord),
) -> Store
pub fn upsert_base_customer_payment_methods(
store: Store,
records: List(types.CustomerPaymentMethodRecord),
) -> Store
pub fn upsert_base_customers(
store: Store,
records: List(types.CustomerRecord),
) -> Store
pub fn upsert_base_delivery_profiles(
store: Store,
profiles: List(types.DeliveryProfileRecord),
) -> Store
pub fn upsert_base_discounts(
store: Store,
records: List(types.DiscountRecord),
) -> Store
pub fn upsert_base_draft_order_variant_catalog(
store: Store,
records: List(types.DraftOrderVariantCatalogRecord),
) -> Store
pub fn upsert_base_draft_orders(
store: Store,
records: List(types.DraftOrderRecord),
) -> Store
pub fn upsert_base_files(
store: Store,
files: List(types.FileRecord),
) -> Store
pub fn upsert_base_fulfillment_orders(
store: Store,
fulfillment_orders: List(types.FulfillmentOrderRecord),
) -> Store
pub fn upsert_base_fulfillment_services(
store: Store,
services: List(types.FulfillmentServiceRecord),
) -> Store
pub fn upsert_base_fulfillments(
store: Store,
fulfillments: List(types.FulfillmentRecord),
) -> Store
pub fn upsert_base_gift_card_configuration(
store: Store,
record: types.GiftCardConfigurationRecord,
) -> Store
Upsert the singleton base gift-card configuration.
Mirrors upsertBaseGiftCardConfiguration.
pub fn upsert_base_gift_cards(
store: Store,
records: List(types.GiftCardRecord),
) -> Store
Upsert one or more gift-card records into the base state.
Mirrors upsertBaseGiftCards.
pub fn upsert_base_inventory_shipments(
store: Store,
shipments: List(types.InventoryShipmentRecord),
) -> Store
pub fn upsert_base_inventory_transfers(
store: Store,
transfers: List(types.InventoryTransferRecord),
) -> Store
pub fn upsert_base_locations(
store: Store,
records: List(types.LocationRecord),
) -> Store
pub fn upsert_base_marketing_activities(
store: Store,
records: List(types.MarketingRecord),
) -> Store
pub fn upsert_base_marketing_events(
store: Store,
records: List(types.MarketingRecord),
) -> Store
pub fn upsert_base_markets(
store: Store,
records: List(types.MarketRecord),
) -> Store
pub fn upsert_base_markets_root_payload(
store: Store,
key: String,
payload: types.CapturedJsonValue,
) -> Store
pub fn upsert_base_metafield_definitions(
store: Store,
definitions: List(types.MetafieldDefinitionRecord),
) -> Store
pub fn upsert_base_metaobject_definitions(
store: Store,
records: List(types.MetaobjectDefinitionRecord),
) -> Store
pub fn upsert_base_metaobjects(
store: Store,
records: List(types.MetaobjectRecord),
) -> Store
pub fn upsert_base_online_store_content(
store: Store,
records: List(types.OnlineStoreContentRecord),
) -> Store
pub fn upsert_base_online_store_integrations(
store: Store,
records: List(types.OnlineStoreIntegrationRecord),
) -> Store
pub fn upsert_base_orders(
store: Store,
records: List(types.OrderRecord),
) -> Store
pub fn upsert_base_payment_customizations(
store: Store,
records: List(types.PaymentCustomizationRecord),
) -> Store
pub fn upsert_base_price_lists(
store: Store,
records: List(types.PriceListRecord),
) -> Store
pub fn upsert_base_product_collections(
store: Store,
records: List(types.ProductCollectionRecord),
) -> Store
pub fn upsert_base_product_feeds(
store: Store,
records: List(types.ProductFeedRecord),
) -> Store
pub fn upsert_base_product_operations(
store: Store,
operations: List(types.ProductOperationRecord),
) -> Store
pub fn upsert_base_product_resource_feedback(
store: Store,
records: List(types.ProductResourceFeedbackRecord),
) -> Store
pub fn upsert_base_product_variants(
store: Store,
records: List(types.ProductVariantRecord),
) -> Store
pub fn upsert_base_products(
store: Store,
records: List(types.ProductRecord),
) -> Store
Upsert product records into the base state. Capture/upstream state wins over stale deleted markers, matching the existing collection slice pattern.
pub fn upsert_base_publications(
store: Store,
records: List(types.PublicationRecord),
) -> Store
pub fn upsert_base_publishable(
store: Store,
record: types.StorePropertyRecord,
) -> Store
pub fn upsert_base_reverse_deliveries(
store: Store,
records: List(types.ReverseDeliveryRecord),
) -> Store
pub fn upsert_base_reverse_fulfillment_orders(
store: Store,
records: List(types.ReverseFulfillmentOrderRecord),
) -> Store
pub fn upsert_base_saved_searches(
store: Store,
records: List(types.SavedSearchRecord),
) -> Store
Upsert one or more saved-search records into the base state.
Mirrors upsertBaseSavedSearches. Removes any existing
“deleted” markers (in either base or staged) for the same id, since
the upstream answer wins.
pub fn upsert_base_segments(
store: Store,
records: List(types.SegmentRecord),
) -> Store
pub fn upsert_base_selling_plan_groups(
store: Store,
groups: List(types.SellingPlanGroupRecord),
) -> Store
pub fn upsert_base_shipping_orders(
store: Store,
orders: List(types.ShippingOrderRecord),
) -> Store
pub fn upsert_base_shipping_packages(
store: Store,
packages: List(types.ShippingPackageRecord),
) -> Store
pub fn upsert_base_shop(
store: Store,
record: types.ShopRecord,
) -> Store
pub fn upsert_base_shop_locales(
store: Store,
records: List(types.ShopLocaleRecord),
) -> Store
Upsert one or more shop-locale records into the base state. Mirrors
upsertBaseShopLocales. Removes any existing “deleted” markers
(in either base or staged) for the same locale, since the upstream
answer wins.
pub fn upsert_base_shopify_functions(
store: Store,
records: List(types.ShopifyFunctionRecord),
) -> Store
Persist upstream-hydrated ShopifyFunctionRecord rows into base state.
Functions cannot be deleted in the proxy — once a record is staged or
hydrated upstream, it stays.
pub fn upsert_base_store_property_location(
store: Store,
record: types.StorePropertyRecord,
) -> Store
pub fn upsert_base_store_property_mutation_payload(
store: Store,
record: types.StorePropertyMutationPayloadRecord,
) -> Store
pub fn upsert_base_translation(
store: Store,
record: types.TranslationRecord,
) -> Store
Upsert a translation record into base state. Used by LiveHybrid localization reads to remember upstream source-content markers without treating that hydration as a staged mutation.
pub fn upsert_base_web_presences(
store: Store,
records: List(types.WebPresenceRecord),
) -> Store
pub fn upsert_base_webhook_subscriptions(
store: Store,
records: List(types.WebhookSubscriptionRecord),
) -> Store
Upsert one or more webhook-subscription records into the base state.
Mirrors upsertBaseWebhookSubscriptions. Removes any existing
“deleted” markers (in either base or staged) for the same id, since
the upstream answer wins.
pub fn upsert_staged_b2b_company(
store: Store,
record: types.B2BCompanyRecord,
) -> #(types.B2BCompanyRecord, Store)
pub fn upsert_staged_b2b_company_contact(
store: Store,
record: types.B2BCompanyContactRecord,
) -> #(types.B2BCompanyContactRecord, Store)
pub fn upsert_staged_b2b_company_contact_role(
store: Store,
record: types.B2BCompanyContactRoleRecord,
) -> #(types.B2BCompanyContactRoleRecord, Store)
pub fn upsert_staged_b2b_company_location(
store: Store,
record: types.B2BCompanyLocationRecord,
) -> #(types.B2BCompanyLocationRecord, Store)
pub fn upsert_staged_cart_transform(
store: Store,
record: types.CartTransformRecord,
) -> #(types.CartTransformRecord, Store)
Stage a CartTransformRecord. Mirrors upsertStagedCartTransform.
pub fn upsert_staged_catalog(
store: Store,
record: types.CatalogRecord,
) -> #(types.CatalogRecord, Store)
pub fn upsert_staged_collections(
store: Store,
records: List(types.CollectionRecord),
) -> Store
pub fn upsert_staged_files(
store: Store,
files: List(types.FileRecord),
) -> Store
pub fn upsert_staged_inventory_shipment(
store: Store,
shipment: types.InventoryShipmentRecord,
) -> #(types.InventoryShipmentRecord, Store)
pub fn upsert_staged_inventory_transfer(
store: Store,
transfer: types.InventoryTransferRecord,
) -> #(types.InventoryTransferRecord, Store)
pub fn upsert_staged_market(
store: Store,
record: types.MarketRecord,
) -> #(types.MarketRecord, Store)
pub fn upsert_staged_metafield_definitions(
store: Store,
definitions: List(types.MetafieldDefinitionRecord),
) -> Store
pub fn upsert_staged_metaobject(
store: Store,
record: types.MetaobjectRecord,
) -> #(types.MetaobjectRecord, Store)
pub fn upsert_staged_metaobject_definition(
store: Store,
record: types.MetaobjectDefinitionRecord,
) -> #(types.MetaobjectDefinitionRecord, Store)
pub fn upsert_staged_online_store_content(
store: Store,
record: types.OnlineStoreContentRecord,
) -> #(types.OnlineStoreContentRecord, Store)
pub fn upsert_staged_online_store_integration(
store: Store,
record: types.OnlineStoreIntegrationRecord,
) -> #(types.OnlineStoreIntegrationRecord, Store)
pub fn upsert_staged_order_mandate_payment(
store: Store,
record: types.OrderMandatePaymentRecord,
) -> Store
pub fn upsert_staged_payment_customization(
store: Store,
record: types.PaymentCustomizationRecord,
) -> Store
pub fn upsert_staged_payment_terms(
store: Store,
record: types.PaymentTermsRecord,
) -> Store
pub fn upsert_staged_price_list(
store: Store,
record: types.PriceListRecord,
) -> #(types.PriceListRecord, Store)
pub fn upsert_staged_product(
store: Store,
record: types.ProductRecord,
) -> #(types.ProductRecord, Store)
pub fn upsert_staged_product_collections(
store: Store,
records: List(types.ProductCollectionRecord),
) -> Store
pub fn upsert_staged_product_feed(
store: Store,
record: types.ProductFeedRecord,
) -> #(types.ProductFeedRecord, Store)
pub fn upsert_staged_product_resource_feedback(
store: Store,
record: types.ProductResourceFeedbackRecord,
) -> #(types.ProductResourceFeedbackRecord, Store)
pub fn upsert_staged_product_variant(
store: Store,
record: types.ProductVariantRecord,
) -> #(types.ProductVariantRecord, Store)
pub fn upsert_staged_publication(
store: Store,
record: types.PublicationRecord,
) -> #(types.PublicationRecord, Store)
pub fn upsert_staged_publishable(
store: Store,
record: types.StorePropertyRecord,
) -> #(types.StorePropertyRecord, Store)
pub fn upsert_staged_saved_search(
store: Store,
record: types.SavedSearchRecord,
) -> #(types.SavedSearchRecord, Store)
Stage a saved-search record. Mirrors upsertStagedSavedSearch. The
TS version returns a fresh clone — Gleam values are already
immutable, so we return the record unchanged.
pub fn upsert_staged_segment(
store: Store,
record: types.SegmentRecord,
) -> #(types.SegmentRecord, Store)
Stage a segment record. Mirrors upsertStagedSegment. Returns the
stored record alongside the new store so the caller can build a
mutation payload.
pub fn upsert_staged_selling_plan_group(
store: Store,
group: types.SellingPlanGroupRecord,
) -> #(types.SellingPlanGroupRecord, Store)
pub fn upsert_staged_shop_resource_feedback(
store: Store,
record: types.ShopResourceFeedbackRecord,
) -> #(types.ShopResourceFeedbackRecord, Store)
pub fn upsert_staged_shopify_function(
store: Store,
record: types.ShopifyFunctionRecord,
) -> #(types.ShopifyFunctionRecord, Store)
Stage a ShopifyFunctionRecord. Mirrors upsertStagedShopifyFunction.
Functions cannot be deleted in the proxy — once a record is staged or
hydrated upstream, it stays.
pub fn upsert_staged_store_property_location(
store: Store,
record: types.StorePropertyRecord,
) -> #(types.StorePropertyRecord, Store)
pub fn upsert_staged_validation(
store: Store,
record: types.ValidationRecord,
) -> #(types.ValidationRecord, Store)
Stage a ValidationRecord. Mirrors upsertStagedValidation. Clears
any deletion marker the staged side may carry for the same id.
pub fn upsert_staged_web_presence(
store: Store,
record: types.WebPresenceRecord,
) -> #(types.WebPresenceRecord, Store)
pub fn upsert_staged_webhook_subscription(
store: Store,
record: types.WebhookSubscriptionRecord,
) -> #(types.WebhookSubscriptionRecord, Store)
Stage a webhook-subscription record. Mirrors
upsertStagedWebhookSubscription. The TS version returns a fresh
clone — Gleam values are already immutable, so we return the record
unchanged.